added fast math APIs

1. Added fast math apis for sin, cos, tan, sincos
2. Added test for trig math functions
3. Added logarithm fast math
4. Changed how hipGetDevice, hipDeviceGetCacheConfig emit errors

Change-Id: Ie6ab594ddd5853cbe85e39a2f6d3479a807fa323


[ROCm/hip commit: 94d2115d6d]
This commit is contained in:
Aditya Atluri
2016-11-22 10:20:09 -06:00
parent c49562d59c
commit c8071e3d84
4 changed files with 98 additions and 11 deletions
+6 -2
View File
@@ -44,7 +44,7 @@ hipError_t hipGetDevice(int *deviceId)
*deviceId = ctx->getDevice()->_deviceId;
}
}else{
e = hipErrorInvalidDevice;
e = hipErrorInvalidValue;
}
return ihipLogStatus(e);
@@ -66,7 +66,7 @@ hipError_t hipGetDeviceCount(int *count)
e = ihipLogStatus(hipErrorNoDevice);
}
} else {
e = ihipLogStatus(hipErrorNoDevice);
e = ihipLogStatus(hipErrorInvalidValue);
}
return e;
}
@@ -84,6 +84,10 @@ hipError_t hipDeviceGetCacheConfig(hipFuncCache_t *cacheConfig)
{
HIP_INIT_API(cacheConfig);
if(cacheConfig == nullptr) {
return ihipLogStatus(hipErrorInvalidValue);
}
*cacheConfig = hipFuncCachePreferNone;
return ihipLogStatus(hipSuccess);