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
This commit is contained in:
+6
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user