summaryrefslogtreecommitdiff
path: root/src/routines/level2
diff options
context:
space:
mode:
Diffstat (limited to 'src/routines/level2')
-rw-r--r--src/routines/level2/xgemv.cpp3
-rw-r--r--src/routines/level2/xger.cpp3
-rw-r--r--src/routines/level2/xher.cpp3
-rw-r--r--src/routines/level2/xher2.cpp3
-rw-r--r--src/routines/level2/xtrsv.cpp10
-rw-r--r--src/routines/level2/xtrsv.hpp2
6 files changed, 7 insertions, 17 deletions
diff --git a/src/routines/level2/xgemv.cpp b/src/routines/level2/xgemv.cpp
index 52e66de6..7d2e5f60 100644
--- a/src/routines/level2/xgemv.cpp
+++ b/src/routines/level2/xgemv.cpp
@@ -123,8 +123,7 @@ void Xgemv<T>::MatVec(const Layout layout, const Transpose a_transpose,
}
// Retrieves the Xgemv kernel from the compiled binary
- const auto program = GetProgramFromCache(context_, PrecisionValue<T>(), routine_name_);
- auto kernel = Kernel(program, kernel_name);
+ auto kernel = Kernel(program_, kernel_name);
// Sets the kernel arguments
kernel.SetArgument(0, static_cast<int>(m_real));
diff --git a/src/routines/level2/xger.cpp b/src/routines/level2/xger.cpp
index d16ebd11..9ec156a1 100644
--- a/src/routines/level2/xger.cpp
+++ b/src/routines/level2/xger.cpp
@@ -53,8 +53,7 @@ void Xger<T>::DoGer(const Layout layout,
TestVectorY(n, y_buffer, y_offset, y_inc);
// Retrieves the kernel from the compiled binary
- const auto program = GetProgramFromCache(context_, PrecisionValue<T>(), routine_name_);
- auto kernel = Kernel(program, "Xger");
+ auto kernel = Kernel(program_, "Xger");
// Sets the kernel arguments
kernel.SetArgument(0, static_cast<int>(a_one));
diff --git a/src/routines/level2/xher.cpp b/src/routines/level2/xher.cpp
index 6c334e63..ba12a3ef 100644
--- a/src/routines/level2/xher.cpp
+++ b/src/routines/level2/xher.cpp
@@ -67,8 +67,7 @@ void Xher<T,U>::DoHer(const Layout layout, const Triangle triangle,
const auto matching_alpha = GetAlpha(alpha);
// Retrieves the kernel from the compiled binary
- const auto program = GetProgramFromCache(context_, PrecisionValue<T>(), routine_name_);
- auto kernel = Kernel(program, "Xher");
+ auto kernel = Kernel(program_, "Xher");
// Sets the kernel arguments
kernel.SetArgument(0, static_cast<int>(n));
diff --git a/src/routines/level2/xher2.cpp b/src/routines/level2/xher2.cpp
index 11e2c871..a420e693 100644
--- a/src/routines/level2/xher2.cpp
+++ b/src/routines/level2/xher2.cpp
@@ -54,8 +54,7 @@ void Xher2<T>::DoHer2(const Layout layout, const Triangle triangle,
TestVectorY(n, y_buffer, y_offset, y_inc);
// Retrieves the kernel from the compiled binary
- const auto program = GetProgramFromCache(context_, PrecisionValue<T>(), routine_name_);
- auto kernel = Kernel(program, "Xher2");
+ auto kernel = Kernel(program_, "Xher2");
// Sets the kernel arguments
kernel.SetArgument(0, static_cast<int>(n));
diff --git a/src/routines/level2/xtrsv.cpp b/src/routines/level2/xtrsv.cpp
index b0e4c5ae..d5d009ff 100644
--- a/src/routines/level2/xtrsv.cpp
+++ b/src/routines/level2/xtrsv.cpp
@@ -37,9 +37,6 @@ void Xtrsv<T>::Substitution(const Layout layout, const Triangle triangle,
if (n > db_["TRSV_BLOCK_SIZE"]) { throw BLASError(StatusCode::kUnexpectedError); };
- // Retrieves the program from the cache
- const auto program = GetProgramFromCache(context_, PrecisionValue<T>(), "TRSV");
-
// Translates CLBlast arguments to 0/1 integers for the OpenCL kernel
const auto is_unit_diagonal = (diagonal == Diagonal::kNonUnit) ? 0 : 1;
const auto is_transposed = ((a_transpose == Transpose::kNo && layout == Layout::kColMajor) ||
@@ -52,7 +49,7 @@ void Xtrsv<T>::Substitution(const Layout layout, const Triangle triangle,
// Retrieves the kernel from the compiled binary
const auto kernel_name = (is_upper) ? "trsv_backward" : "trsv_forward";
- auto kernel = Kernel(program, kernel_name);
+ auto kernel = Kernel(program_, kernel_name);
// Sets the kernel arguments
kernel.SetArgument(0, static_cast<int>(n));
@@ -94,9 +91,6 @@ void Xtrsv<T>::DoTrsv(const Layout layout, const Triangle triangle,
TestMatrixA(n, n, a_buffer, a_offset, a_ld);
TestVectorX(n, b_buffer, b_offset, b_inc);
- // Retrieves the program from the cache
- const auto program = GetProgramFromCache(context_, PrecisionValue<T>(), "TRSV");
-
// Creates a copy of B to avoid overwriting input while computing output
// TODO: Make x with 0 offset and unit increment by creating custom copy-to and copy-from kernels
const auto x_offset = b_offset;
@@ -108,7 +102,7 @@ void Xtrsv<T>::DoTrsv(const Layout layout, const Triangle triangle,
// Fills the output buffer with zeros
auto eventWaitList = std::vector<Event>();
auto fill_vector_event = Event();
- FillVector(queue_, device_, program, db_, fill_vector_event.pointer(), eventWaitList,
+ FillVector(queue_, device_, program_, db_, fill_vector_event.pointer(), eventWaitList,
n, x_inc, x_offset, x_buffer, ConstantZero<T>());
fill_vector_event.WaitForCompletion();
diff --git a/src/routines/level2/xtrsv.hpp b/src/routines/level2/xtrsv.hpp
index dc3f32f0..67e626a1 100644
--- a/src/routines/level2/xtrsv.hpp
+++ b/src/routines/level2/xtrsv.hpp
@@ -27,11 +27,11 @@ class Xtrsv: public Xgemv<T> {
public:
// Uses the generic matrix-vector routine
- using Xgemv<T>::routine_name_;
using Xgemv<T>::queue_;
using Xgemv<T>::context_;
using Xgemv<T>::device_;
using Xgemv<T>::db_;
+ using Xgemv<T>::program_;
using Xgemv<T>::DoGemv;
// Constructor