<trclass="memitem:ga0a1c9ccd775758d9d7d5b5a1f525b719"><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__PeerToPeer.html#ga0a1c9ccd775758d9d7d5b5a1f525b719">hipDeviceCanAccessPeer</a> (int *canAccessPeer, int deviceId, int peerDeviceId)</td></tr>
<trclass="memdesc:ga0a1c9ccd775758d9d7d5b5a1f525b719"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Determine if a device can access a peer's memory. <ahref="#ga0a1c9ccd775758d9d7d5b5a1f525b719">More...</a><br/></td></tr>
<trclass="memitem:ga0caca59034134d7a7bb893cc1caa653e"><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__PeerToPeer.html#ga0caca59034134d7a7bb893cc1caa653e">hipDeviceEnablePeerAccess</a> (int peerDeviceId, unsigned int flags)</td></tr>
<trclass="memdesc:ga0caca59034134d7a7bb893cc1caa653e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Enable direct access from current device's virtual address space to memory allocations physically located on a peer device. <ahref="#ga0caca59034134d7a7bb893cc1caa653e">More...</a><br/></td></tr>
<trclass="memdesc:ga85030c72824fb60aaddc7374ab60481b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Disable direct access from current device's virtual address space to memory allocations physically located on a peer device. <ahref="#ga85030c72824fb60aaddc7374ab60481b">More...</a><br/></td></tr>
<p>Returns "1" in <code>canAccessPeer</code> if the specified <code>device</code> is capable of directly accessing memory physically located on peerDevice , or "0" if not.</p>
<aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d"title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a> if deviceId or peerDeviceId are not valid devices </dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>PeerToPeer support is experimental.</dd></dl>
<p>HCC returns 0 in *canAccessPeer ; Need to update this function when RT supports P2P </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#ggadf5010f6e140a53ecbdf949e73e87594a2ee0bf2e64840f253e4a1b12bbaf2d09"title="Peer access was never enabled from the current device. ">hipErrorPeerAccessNotEnabled</a></dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>PeerToPeer support is experimental. </dd></dl>
<p>Enable direct access from current device's virtual address space to memory allocations physically located on a peer device. </p>
<p>Memory which already allocated on peer device will be mapped into the address space of the current device. In addition, all future memory allocations on peerDeviceId will be mapped into the address space of the current device when the memory is allocated. The peer memory remains accessible from the current device until a call to hipDeviceDisablePeerAccess or hipDeviceReset.</p>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">flags</td><td>Returns <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#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83"title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, </td></tr>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a5399c146f91246f8b77abcd4ea30e7ac"title="Peer access was already enabled from the current device. ">hipErrorPeerAccessAlreadyEnabled</a> if peer access is already enabled for this device. </dd></dl>