diff options
author | Ivan Shapovalov <intelfx@intelfx.name> | 2016-11-26 20:53:42 +0300 |
---|---|---|
committer | Ivan Shapovalov <intelfx@intelfx.name> | 2017-01-24 11:56:15 +0300 |
commit | 5bcd92f2974d94e8add31816d3b9d48a42289500 (patch) | |
tree | 51b24e302a08d62058311ead32ab626ce4c11263 /src/routines/level1/xaxpy.cpp | |
parent | e943fe77d64f42ed1e57c9919de8ca6787760f2b (diff) |
Routine, Cache: generalize, reduce amount of copying in fast path
Implement a generalized Cache<K, V>. Two variants are provided: the
first one is based on std::map, using C++14-specific transparent
std::less<> and generalized std::map::find() to allow searching by tuple
of references. The second one is based on std::vector and O(n) lookup,
but remains C++11-compliant.
Diffstat (limited to 'src/routines/level1/xaxpy.cpp')
-rw-r--r-- | src/routines/level1/xaxpy.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/routines/level1/xaxpy.cpp b/src/routines/level1/xaxpy.cpp index 5436c5b7..39f61ef4 100644 --- a/src/routines/level1/xaxpy.cpp +++ b/src/routines/level1/xaxpy.cpp @@ -52,8 +52,7 @@ void Xaxpy<T>::DoAxpy(const size_t n, const T alpha, auto kernel_name = (use_fast_kernel) ? "XaxpyFast" : "Xaxpy"; // Retrieves the Xaxpy 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 if (use_fast_kernel) { |