<trclass="memdesc:ga3d68ba64959615d4ab84f10caa12433b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Return attributes for the specified pointer. <ahref="#ga3d68ba64959615d4ab84f10caa12433b">More...</a><br/></td></tr>
<trclass="memdesc:ga4c6fcfe80010069d2792780d00dcead2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Allocate memory on the default accelerator. <ahref="#ga4c6fcfe80010069d2792780d00dcead2">More...</a><br/></td></tr>
<trclass="memitem:ga8fa7a0478020b835a24785cd6bb89725"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__Memory.html#ga8fa7a0478020b835a24785cd6bb89725">hipHostGetDevicePointer</a> (void **devPtr, void *hstPtr, unsigned int flags)</td></tr>
<trclass="memdesc:ga8fa7a0478020b835a24785cd6bb89725"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get Device pointer from Host Pointer allocated through hipHostAlloc. <ahref="#ga8fa7a0478020b835a24785cd6bb89725">More...</a><br/></td></tr>
<trclass="memitem:gab8258f051e1a1f7385f794a15300e674"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__Memory.html#gab8258f051e1a1f7385f794a15300e674">hipHostRegister</a> (void *hostPtr, size_t sizeBytes, unsigned int flags)</td></tr>
<trclass="memdesc:gab8258f051e1a1f7385f794a15300e674"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Register host memory so it can be accessed from the current device. <ahref="#gab8258f051e1a1f7385f794a15300e674">More...</a><br/></td></tr>
<trclass="memdesc:ga740d08da65cae1441ba32f8fedb863d1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Free memory allocated by the hcc hip memory allocation API. This API performs an implicit <aclass="el"href="group__Device.html#gaefdc2847fb1d6c3fb1354e827a191ebd"title="Blocks until the default device has completed all preceding requested tasks. ">hipDeviceSynchronize()</a> call. <ahref="#ga740d08da65cae1441ba32f8fedb863d1">More...</a><br/></td></tr>
<trclass="memdesc:gad2164cc3d49da53052f4b83b789e90c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Free memory allocated by the hcc hip host memory allocation API. <ahref="#gad2164cc3d49da53052f4b83b789e90c9">More...</a><br/></td></tr>
<trclass="memdesc:ga2e543f58ee4544e317cd695d6d82e0a3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Free memory allocated by the hcc hip host memory allocation API. <ahref="#ga2e543f58ee4544e317cd695d6d82e0a3">More...</a><br/></td></tr>
<trclass="memdesc:gac1a055d288302edd641c6d7416858e1e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Copy data from src to dst. <ahref="#gac1a055d288302edd641c6d7416858e1e">More...</a><br/></td></tr>
<trclass="memdesc:ga131ac5c1ba04e186112491cb9bf964bc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Copies <code>sizeBytes</code> bytes from the memory area pointed to by <code>src</code> to the memory area pointed to by <code>offset</code> bytes from the start of symbol <code>symbol</code>. <ahref="#ga131ac5c1ba04e186112491cb9bf964bc">More...</a><br/></td></tr>
<trclass="memdesc:gad55fa9f5980b711bc93c52820149ba18"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Copy data from src to dst asynchronously. <ahref="#gad55fa9f5980b711bc93c52820149ba18">More...</a><br/></td></tr>
<trclass="memitem:gac7441e74affcce4b8b69dba996c5ebc4"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__Memory.html#gac7441e74affcce4b8b69dba996c5ebc4">hipMemset</a> (void *dst, int value, size_t sizeBytes)</td></tr>
<trclass="memdesc:gac7441e74affcce4b8b69dba996c5ebc4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Copy data from src to dst asynchronously. <ahref="#gac7441e74affcce4b8b69dba996c5ebc4">More...</a><br/></td></tr>
<trclass="memitem:gae7d90e14c387e49f10db597f12915c54"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__Memory.html#gae7d90e14c387e49f10db597f12915c54">hipMemsetAsync</a> (void *dst, int value, size_t sizeBytes, hipStream_t stream)</td></tr>
<trclass="memdesc:gae7d90e14c387e49f10db597f12915c54"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant byte value value. <ahref="#gae7d90e14c387e49f10db597f12915c54">More...</a><br/></td></tr>
<trclass="memdesc:ga311c3e246a21590de14478b8bd063be2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Query memory info. Return snapshot of free memory, and total allocatable memory on the device. <ahref="#ga311c3e246a21590de14478b8bd063be2">More...</a><br/></td></tr>
<p>Free memory allocated by the hcc hip memory allocation API. This API performs an implicit <aclass="el"href="group__Device.html#gaefdc2847fb1d6c3fb1354e827a191ebd"title="Blocks until the default device has completed all preceding requested tasks. ">hipDeviceSynchronize()</a> call. </p>
<li><aclass="el"href="group__GlobalDefs.html#gac7c100d241ff84ad10109bb00b7b25dc"title="Flags that can be used with hipHostRegister. ">hipHostRegisterDefault</a> Memory is Mapped and Portable</li>
<li><aclass="el"href="group__GlobalDefs.html#ga2db444f2315d412d3c7ba80ec6049583"title="Memory is considered registered by all contexts. HIP only supports one context so this is always assu...">hipHostRegisterPortable</a> Memory is considered registered by all contexts. HIP only supports one context so this is always assumed true.</li>
<li><aclass="el"href="group__GlobalDefs.html#gacfa4edcfcb39fc61bff6bdecb14d7618"title="Map the allocation into the address space for the current device. The device pointer can be obtained ...">hipHostRegisterMapped</a> Map the allocation into the address space for the current device. The device pointer can be obtained with <aclass="el"href="group__Memory.html#ga8fa7a0478020b835a24785cd6bb89725"title="Get Device pointer from Host Pointer allocated through hipHostAlloc. ">hipHostGetDevicePointer</a>.</li>
</ul>
<p>After registering the memory, use <aclass="el"href="group__Memory.html#ga8fa7a0478020b835a24785cd6bb89725"title="Get Device pointer from Host Pointer allocated through hipHostAlloc. ">hipHostGetDevicePointer</a> to obtain the mapped device pointer. On many systems, the mapped device pointer will have a different value than the mapped host pointer. Applications must use the device pointer in device code, and the host pointer in device code.</p>
<p>On some systems, registered memory is pinned. On some systems, registered memory may not be actually be pinned but uses OS or hardware facilities to all GPU access to the host memory.</p>
<p>Developers are strongly encouraged to register memory blocks which are aligned to the host cache-line size. (typically 64-bytes but can be obtains from the CPUID instruction).</p>
<p>If registering non-aligned pointers, the application must take care when register pointers from the same cache line on different devices. HIP's coarse-grained synchronization model does not guarantee correct results if different devices write to different parts of the same cache block - typically one of the writes will "win" and overwrite data from the other registered memory region.</p>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">hostPtr</td><td>Host pointer previously registered with <aclass="el"href="group__Memory.html#gab8258f051e1a1f7385f794a15300e674"title="Register host memory so it can be accessed from the current device. ">hipHostRegister</a></td></tr>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063"title="Successful completion. ">hipSuccess</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a813b3f014e2a3932d1f0e3e712cf9d3c"title="Memory free error. ">hipErrorMemoryFree</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa74e64c5b2f5fb0d6a92681f5b234073"title="Unknown error. ">hipErrorUnknown</a></dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>If host or dest are not pinned, the memory copy will be performed synchronously. For best performance, use hipHostMalloc to allocate host memory that is transferred asynchronously.</dd></dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063"title="Successful completion. ">hipSuccess</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a813b3f014e2a3932d1f0e3e712cf9d3c"title="Memory free error. ">hipErrorMemoryFree</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa74e64c5b2f5fb0d6a92681f5b234073"title="Unknown error. ">hipErrorUnknown</a></dd>
<dd>
<aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063"title="Successful completion. ">hipSuccess</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d"title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594ae35ad9fb66b7c33f21a021efe89975b0"title="Invalid memory copy direction. ">hipErrorInvalidMemcpyDirection</a>, </dd>
<dd>
<aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a> : If dst==NULL or src==NULL, or other bad argument. </dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>on HCC hipMemcpyAsync does not support overlapped H2D and D2H copies. </dd>
<dd>
on HCC hipMemcpyAsync requires that any host pointers are pinned (ie via the hipMallocHost call). </dd></dl>
<p>Copies <code>sizeBytes</code> bytes from the memory area pointed to by <code>src</code> to the memory area pointed to by <code>offset</code> bytes from the start of symbol <code>symbol</code>. </p>
<p>The memory areas may not overlap. Symbol can either be a variable that resides in global or constant memory space, or it can be a character string, naming a variable that resides in global or constant memory space. Kind can be either hipMemcpyHostToDevice or hipMemcpyDeviceToDevice TODO: cudaErrorInvalidSymbol and cudaErrorInvalidMemcpyDirection is not supported, use hipErrorUnknown for now.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">symbolName</td><td>- Symbol destination on device </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">src</td><td>- Data being copy from </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">sizeBytes</td><td>- Data size in bytes </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">offset</td><td>- Offset from start of symbol in bytes </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">kind</td><td>- Type of transfer </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063"title="Successful completion. ">hipSuccess</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a813b3f014e2a3932d1f0e3e712cf9d3c"title="Memory free error. ">hipErrorMemoryFree</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa74e64c5b2f5fb0d6a92681f5b234073"title="Unknown error. ">hipErrorUnknown</a></dd></dl>
<p>It supports memory from host to device, device to host, device to device and host to host.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">dst</td><td>Data being copy to </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">src</td><td>Data being copy from </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">sizeBytes</td><td>Data size in bytes </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">accelerator_view</td><td>Accelerator view which the copy is being enqueued </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063"title="Successful completion. ">hipSuccess</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a813b3f014e2a3932d1f0e3e712cf9d3c"title="Memory free error. ">hipErrorMemoryFree</a></dd></dl>
<p><aclass="el"href="group__Memory.html#gae7d90e14c387e49f10db597f12915c54"title="Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant byte value val...">hipMemsetAsync()</a> is asynchronous with respect to the host, so the call may return before the memset is complete. The operation can optionally be associated to a stream by passing a non-zero stream argument. If stream is non-zero, the operation may overlap with operations in other streams.</p>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063"title="Successful completion. ">hipSuccess</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a813b3f014e2a3932d1f0e3e712cf9d3c"title="Memory free error. ">hipErrorMemoryFree</a></dd>
<dd>
<aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a></dd></dl>
<p>Return attributes for the specified pointer. </p>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063"title="Successful completion. ">hipSuccess</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d"title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a></dd></dl>