\doxysubsection{SVM memory addresses}
\hypertarget{group__addressmemory}{}\label{group__addressmemory}\index{SVM memory addresses@{SVM memory addresses}}


This module contains API functions to handle SVM memory addresses.  


\doxysubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} \mbox{\hyperlink{group__addressmemory_ga21f8c43c2b1503cc785618c462ac7661}{svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+defined}} (const void \texorpdfstring{$\ast$}{*}svm, const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}} kernel, const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}} address)
\begin{DoxyCompactList}\small\item\em This function checks whether an address is defined in a memory. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} \mbox{\hyperlink{group__addressmemory_ga4a4b65d000236f7b45531758d373b422}{svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+initialised}} (const void \texorpdfstring{$\ast$}{*}svm, const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}} kernel, const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}} address)
\begin{DoxyCompactList}\small\item\em This function checks whether an address is initialised in a memory. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga1d0dbcf7d04a60f9bab902433710f617}{SVM\+\_\+\+Type}} \mbox{\hyperlink{group__addressmemory_ga01cd117746123ca78ec0f373816dd130}{svm\+\_\+memory\+\_\+address\+\_\+get\+\_\+type}} (const void \texorpdfstring{$\ast$}{*}svm, const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}} kernel, const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}} address)
\begin{DoxyCompactList}\small\item\em This function extracts the type of a value from a memory. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} \mbox{\hyperlink{group__addressmemory_gab537da58c446f89dc507f920ac82f6b6}{svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+writable}} (const void \texorpdfstring{$\ast$}{*}svm, const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}} kernel, const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}} address, const \mbox{\hyperlink{group__api__types_gaf37a7c40972a9dabfa18b14127c34fb1}{SVM\+\_\+\+Value}} value)
\begin{DoxyCompactList}\small\item\em This function checks whether a value can be written into a memory. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void \mbox{\hyperlink{group__addressmemory_gaabfcdf0e3958cbe56f8f8c79e2a289ad}{svm\+\_\+memory\+\_\+address\+\_\+set\+\_\+type}} (const void \texorpdfstring{$\ast$}{*}svm, const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}} kernel, const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}} address, const \mbox{\hyperlink{group__api__types_ga1d0dbcf7d04a60f9bab902433710f617}{SVM\+\_\+\+Type}} type)
\begin{DoxyCompactList}\small\item\em This function modifies the type to an internal type of an address of a memory. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
This module contains API functions to handle SVM memory addresses. 



\doxysubsubsection{Function Documentation}
\Hypertarget{group__addressmemory_ga01cd117746123ca78ec0f373816dd130}\label{group__addressmemory_ga01cd117746123ca78ec0f373816dd130} 
\index{SVM memory addresses@{SVM memory addresses}!svm\_memory\_address\_get\_type@{svm\_memory\_address\_get\_type}}
\index{svm\_memory\_address\_get\_type@{svm\_memory\_address\_get\_type}!SVM memory addresses@{SVM memory addresses}}
\doxysubsubsubsection{\texorpdfstring{svm\_memory\_address\_get\_type()}{svm\_memory\_address\_get\_type()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga1d0dbcf7d04a60f9bab902433710f617}{SVM\+\_\+\+Type}} svm\+\_\+memory\+\_\+address\+\_\+get\+\_\+type (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}}}]{kernel,  }\item[{const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}}}]{address }\end{DoxyParamCaption})}



This function extracts the type of a value from a memory. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em kernel} & The kernel in which the targeted memory is. \\
\hline
\mbox{\texttt{ in}}  & {\em address} & The local address to check.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The type of the value.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
{\em FAILURE} & interruption when the kernel is not owned by our process or is not in a process locked by ours. \\
\hline
{\em MEMORY} & interruption when the address is not defined.\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{group__addressmemory_ga21f8c43c2b1503cc785618c462ac7661}{svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+defined} 

\doxylink{group__ownershipprocesses_ga535796c3203a2baa8095c951b9b2c205}{svm\+\_\+process\+\_\+ownership\+\_\+lock} 

\doxylink{group__getkernels_gad6a03dbf0dd283278cdc4bbc2266efa5}{svm\+\_\+kernel\+\_\+get\+\_\+current} 
\end{DoxySeeAlso}
\Hypertarget{group__addressmemory_ga21f8c43c2b1503cc785618c462ac7661}\label{group__addressmemory_ga21f8c43c2b1503cc785618c462ac7661} 
\index{SVM memory addresses@{SVM memory addresses}!svm\_memory\_address\_is\_defined@{svm\_memory\_address\_is\_defined}}
\index{svm\_memory\_address\_is\_defined@{svm\_memory\_address\_is\_defined}!SVM memory addresses@{SVM memory addresses}}
\doxysubsubsubsection{\texorpdfstring{svm\_memory\_address\_is\_defined()}{svm\_memory\_address\_is\_defined()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+defined (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}}}]{kernel,  }\item[{const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}}}]{address }\end{DoxyParamCaption})}



This function checks whether an address is defined in a memory. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em kernel} & The kernel in which the targeted memory is. \\
\hline
\mbox{\texttt{ in}}  & {\em address} & The local address to check.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TRUE if the address has been allocated, FALSE otherwise.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
{\em FAILURE} & interruption when the kernel is not owned by our process or is not in a process locked by ours.\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{group__ownershipprocesses_ga535796c3203a2baa8095c951b9b2c205}{svm\+\_\+process\+\_\+ownership\+\_\+lock} 

\doxylink{group__getkernels_gad6a03dbf0dd283278cdc4bbc2266efa5}{svm\+\_\+kernel\+\_\+get\+\_\+current} 
\end{DoxySeeAlso}
\Hypertarget{group__addressmemory_ga4a4b65d000236f7b45531758d373b422}\label{group__addressmemory_ga4a4b65d000236f7b45531758d373b422} 
\index{SVM memory addresses@{SVM memory addresses}!svm\_memory\_address\_is\_initialised@{svm\_memory\_address\_is\_initialised}}
\index{svm\_memory\_address\_is\_initialised@{svm\_memory\_address\_is\_initialised}!SVM memory addresses@{SVM memory addresses}}
\doxysubsubsubsection{\texorpdfstring{svm\_memory\_address\_is\_initialised()}{svm\_memory\_address\_is\_initialised()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+initialised (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}}}]{kernel,  }\item[{const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}}}]{address }\end{DoxyParamCaption})}



This function checks whether an address is initialised in a memory. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em kernel} & The kernel in which the targeted memory is. \\
\hline
\mbox{\texttt{ in}}  & {\em address} & The local address to check.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TRUE if the address has been allocated and has been initialised, FALSE otherwise.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
{\em FAILURE} & interruption when the kernel is not owned by our process or is not in a process locked by ours.\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{group__ownershipprocesses_ga535796c3203a2baa8095c951b9b2c205}{svm\+\_\+process\+\_\+ownership\+\_\+lock} 

\doxylink{group__getkernels_gad6a03dbf0dd283278cdc4bbc2266efa5}{svm\+\_\+kernel\+\_\+get\+\_\+current} 
\end{DoxySeeAlso}
\Hypertarget{group__addressmemory_gab537da58c446f89dc507f920ac82f6b6}\label{group__addressmemory_gab537da58c446f89dc507f920ac82f6b6} 
\index{SVM memory addresses@{SVM memory addresses}!svm\_memory\_address\_is\_writable@{svm\_memory\_address\_is\_writable}}
\index{svm\_memory\_address\_is\_writable@{svm\_memory\_address\_is\_writable}!SVM memory addresses@{SVM memory addresses}}
\doxysubsubsubsection{\texorpdfstring{svm\_memory\_address\_is\_writable()}{svm\_memory\_address\_is\_writable()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+writable (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}}}]{kernel,  }\item[{const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}}}]{address,  }\item[{const \mbox{\hyperlink{group__api__types_gaf37a7c40972a9dabfa18b14127c34fb1}{SVM\+\_\+\+Value}}}]{value }\end{DoxyParamCaption})}



This function checks whether a value can be written into a memory. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em kernel} & The kernel in which the targeted memory is. \\
\hline
\mbox{\texttt{ in}}  & {\em address} & The local address to write to. \\
\hline
\mbox{\texttt{ in}}  & {\em value} & The value to check.\\
\hline
\end{DoxyParams}
This API function does not write the value into the memory.

\begin{DoxyReturn}{Returns}
TRUE when the write can be successful, FALSE otherwise.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
{\em FAILURE} & interruption when the kernel is not owned by our process or is not in a process locked by ours.\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{group__writememory_ga41b5b7f2a4dc8b0fe7cbe3e81a346d59}{svm\+\_\+memory\+\_\+write\+\_\+address} 

\doxylink{group__ownershipprocesses_ga535796c3203a2baa8095c951b9b2c205}{svm\+\_\+process\+\_\+ownership\+\_\+lock} 

\doxylink{group__getkernels_gad6a03dbf0dd283278cdc4bbc2266efa5}{svm\+\_\+kernel\+\_\+get\+\_\+current} 
\end{DoxySeeAlso}
\Hypertarget{group__addressmemory_gaabfcdf0e3958cbe56f8f8c79e2a289ad}\label{group__addressmemory_gaabfcdf0e3958cbe56f8f8c79e2a289ad} 
\index{SVM memory addresses@{SVM memory addresses}!svm\_memory\_address\_set\_type@{svm\_memory\_address\_set\_type}}
\index{svm\_memory\_address\_set\_type@{svm\_memory\_address\_set\_type}!SVM memory addresses@{SVM memory addresses}}
\doxysubsubsubsection{\texorpdfstring{svm\_memory\_address\_set\_type()}{svm\_memory\_address\_set\_type()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void svm\+\_\+memory\+\_\+address\+\_\+set\+\_\+type (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_ga19af2c6060f3ae282ea4e73121fac69c}{SVM\+\_\+\+Kernel}}}]{kernel,  }\item[{const \mbox{\hyperlink{group__api__types_gae19c9a8c6077446e11c34dd11059f647}{SVM\+\_\+\+Address}}}]{address,  }\item[{const \mbox{\hyperlink{group__api__types_ga1d0dbcf7d04a60f9bab902433710f617}{SVM\+\_\+\+Type}}}]{type }\end{DoxyParamCaption})}



This function modifies the type to an internal type of an address of a memory. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em kernel} & The kernel in which the targeted memory is. \\
\hline
\mbox{\texttt{ in}}  & {\em address} & The local address to modify. \\
\hline
\mbox{\texttt{ in}}  & {\em type} & The new type.\\
\hline
\end{DoxyParams}
If the address contained a value, this value is cleared.


\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
{\em FAILURE} & interruption when the kernel is not owned by our process or is not in a process locked by ours. \\
\hline
{\em MEMORY} & interruption when the address is not defined.\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{group__addressmemory_ga21f8c43c2b1503cc785618c462ac7661}{svm\+\_\+memory\+\_\+address\+\_\+is\+\_\+defined} 

\doxylink{group__ownershipprocesses_ga535796c3203a2baa8095c951b9b2c205}{svm\+\_\+process\+\_\+ownership\+\_\+lock} 

\doxylink{group__getkernels_gad6a03dbf0dd283278cdc4bbc2266efa5}{svm\+\_\+kernel\+\_\+get\+\_\+current} 
\end{DoxySeeAlso}
