diff options
Diffstat (limited to 'src/utilities.cc')
-rw-r--r-- | src/utilities.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utilities.cc b/src/utilities.cc index 851e6d9f..30b09a5f 100644 --- a/src/utilities.cc +++ b/src/utilities.cc @@ -360,6 +360,13 @@ size_t GetBytes(const Precision precision) { } } +// Convert the template argument into a precision value +template <> Precision PrecisionValue<half>() { return Precision::kHalf; } +template <> Precision PrecisionValue<float>() { return Precision::kSingle; } +template <> Precision PrecisionValue<double>() { return Precision::kDouble; } +template <> Precision PrecisionValue<float2>() { return Precision::kComplexSingle; } +template <> Precision PrecisionValue<double2>() { return Precision::kComplexDouble; } + // ================================================================================================= // Returns false is this precision is not supported by the device |