Fix range limit exceeding actual data size in last step
@@ -288,6 +288,7 @@ int CNAME(BLASLONG n, BLASLONG k, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG inc
range_m[MAX_CPU_NUMBER - num_cpu - 1] = range_m[MAX_CPU_NUMBER - num_cpu] - width;
range_n[num_cpu] = num_cpu * (((n + 15) & ~15) + 16);
+ if (range_n[num_cpu] > n) range_n[num_cpu] = n;
queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
@@ -327,6 +328,7 @@ int CNAME(BLASLONG n, BLASLONG k, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG inc
range_m[num_cpu + 1] = range_m[num_cpu] + width;
range_n[num_cpu] = num_cpu * (((n + 15) & ~15) + 16);
+ if (range_n[num_cpu] > n) range_n[num_cpu] = n;
queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
@@ -356,6 +358,7 @@ int CNAME(BLASLONG n, BLASLONG k, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG inc
range_m[num_cpu + 1] = range_m[num_cpu] + width;
range_n[num_cpu] = num_cpu * (((n + 15) & ~15) + 16);
+ if (range_n[num_cpu] > n) range_n[num_cpu] = n;
queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
