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/clr commit: 1a85762f53]
This commit is contained in:
Aditya Atluri
2016-11-22 10:20:09 -06:00
szülő 5f24847ec0
commit b8b1459a64
4 fájl változott, egészen pontosan 98 új sor hozzáadva és 11 régi sor törölve
@@ -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);