Change Device->Ctx

Change ihipDevice_t -> ihipCtx_t (new)
Change ihipGetTlsDefaultDevice->ihipGetTlsDefaultCtx
Some other changes from device->ctx where appropriate.

Change-Id: I5c4ae93b2fd42c6303aa23d748eb166b7431925d
This commit is contained in:
Ben Sander
2016-08-07 21:46:51 -05:00
parent e7d7c5cbe8
commit 2dc3d3238b
7 changed files with 163 additions and 155 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ hipError_t hipDeviceDisablePeerAccess (int peerDeviceId)
hipError_t err = hipSuccess;
auto thisDevice = ihipGetTlsDefaultDevice();
auto thisDevice = ihipGetTlsDefaultCtx();
auto peerDevice = ihipGetDevice(peerDeviceId);
if ((thisDevice != NULL) && (peerDevice != NULL)) {
#if USE_PEER_TO_PEER>=2
@@ -111,7 +111,7 @@ hipError_t hipDeviceEnablePeerAccess (int peerDeviceId, unsigned int flags)
if (flags != 0) {
err = hipErrorInvalidValue;
} else {
auto thisDevice = ihipGetTlsDefaultDevice();
auto thisDevice = ihipGetTlsDefaultCtx();
auto peerDevice = ihipGetDevice(peerDeviceId);
if (thisDevice == peerDevice) {
err = hipErrorInvalidDevice; // Can't enable peer access to self.