[clblas] 06/67: Updated the computation of the matrix-buffer memory used in case of no unused tail
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Oct 27 08:02:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository clblas.
commit 9b14e88cd65acf2275297830067c85656ea0b3ee
Author: CNugteren <web at cedricnugteren.nl>
Date: Fri Jul 31 09:55:40 2015 +0200
Updated the computation of the matrix-buffer memory used in case of no unused tail
---
src/library/blas/generic/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/library/blas/generic/common.c b/src/library/blas/generic/common.c
index 236640d..f39be3e 100644
--- a/src/library/blas/generic/common.c
+++ b/src/library/blas/generic/common.c
@@ -667,7 +667,7 @@ checkMatrixSizes(
// It is possible to allocate a buffer, and set up lda & ldb such that it looks like it will access outside of the allocated buffer, but if
// M & N are kept small enough, no out of bounds access will occur. Compensate for the offset values and the unused tail memory caused by lda & ldb.
// Ex: BuffSize=6 floats, M=1, N=2, lda=ldb=3, offA = 0, offB = 2 : |A[0,0]|unused|B[0,0]|A[0,1]|unused|B[0,1]|
- memUsed = (( offA + matrSize ) > unusedTail) ? offA + matrSize - unusedTail: 0;
+ memUsed = (( offA + matrSize ) > unusedTail) ? offA + matrSize - unusedTail : offA + matrSize;
if (( memUsed > memSize ) || (offA + matrSize < offA)) {
switch( err )
{
@@ -756,7 +756,7 @@ checkBandedMatrixSizes(
// It is possible to allocate a buffer, and set up lda & ldb such that it looks like it will access outside of the allocated buffer, but if
// M & N are kept small, no out of bounds access will occur. Compensate for the offset values and the unused tail memory caused by lda & ldb.
// Ex: BuffSize=6 floats, M=1, N=2, lda=ldb=3, offA = 0, offB = 2 : |A[0,0]|unused|B[0,0]|A[0,1]|unused|B[0,1]|
- memUsed = (( offA + matrSize ) > unusedTail) ? offA + matrSize - unusedTail: 0;
+ memUsed = (( offA + matrSize ) > unusedTail) ? offA + matrSize - unusedTail : offA + matrSize;
if (memUsed > memSize) {
switch( err )
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clblas.git
More information about the debian-science-commits
mailing list