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]
Bu işleme şunda yer alıyor:
Aditya Atluri
2016-11-22 10:20:09 -06:00
ebeveyn 5f24847ec0
işleme b8b1459a64
4 değiştirilmiş dosya ile 98 ekleme ve 11 silme
+6 -2
Dosyayı Görüntüle
@@ -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);