summaryrefslogtreecommitdiff
path: root/src/kernels
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-02-26 14:31:05 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2017-02-26 14:31:05 +0100
commitdf7638c3058c59b173f04cadef78c1955ac008f6 (patch)
tree082535acc76bb371328a5688170e751a42382a5e /src/kernels
parentb7310036eda482e8871d6a9d1e1660f93be1fd49 (diff)
Fixed an out-of-bounds memory access when filling a matrix with a constant
Diffstat (limited to 'src/kernels')
-rw-r--r--src/kernels/level3/level3.opencl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernels/level3/level3.opencl b/src/kernels/level3/level3.opencl
index 0f5a8607..5ba8cf29 100644
--- a/src/kernels/level3/level3.opencl
+++ b/src/kernels/level3/level3.opencl
@@ -77,12 +77,12 @@ R"(
#if defined(ROUTINE_INVERT) || defined(ROUTINE_TRSM)
__kernel __attribute__((reqd_work_group_size(8, 8, 1)))
-void FillMatrix(const int n, const int ld, const int offset,
+void FillMatrix(const int m, const int n, const int ld, const int offset,
__global real* restrict dest, const real_arg arg_value) {
const real value = GetRealArg(arg_value);
const int id_one = get_global_id(0);
const int id_two = get_global_id(1);
- if (id_one < ld && id_two < n) {
+ if (id_one < m && id_two < n) {
dest[id_two*ld + id_one + offset] = value;
}
}