diff options
Diffstat (limited to 'src/routines/level1/xscal.cc')
-rw-r--r-- | src/routines/level1/xscal.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 22d2cb5b..4792d40b 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xscal<half>::precision_ = Precision::kHalf; -template <> const Precision Xscal<float>::precision_ = Precision::kSingle; -template <> const Precision Xscal<double>::precision_ = Precision::kDouble; -template <> const Precision Xscal<float2>::precision_ = Precision::kComplexSingle; -template <> const Precision Xscal<double2>::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template <typename T> Xscal<T>::Xscal(Queue &queue, EventPointer event, const std::string &name): - Routine<T>(queue, event, name, {"Xaxpy"}, precision_) { + Routine<T>(queue, event, name, {"Xaxpy"}, PrecisionValue<T>()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xscal.opencl" @@ -61,7 +52,7 @@ StatusCode Xscal<T>::DoScal(const size_t n, const T alpha, // Retrieves the Xscal kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue<T>(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments |