aboutsummaryrefslogtreecommitdiff
path: root/redist/dclhelpers.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2018-03-17 03:15:46 -0400
committercnlohr <lohr85@gmail.com>2018-03-17 03:15:46 -0400
commitf0c26bd1b0b8ffe05c0c5f04567a9b7aa47c3e6b (patch)
tree3b869cafdea395944a5f9677dcbdafdec9027e5d /redist/dclhelpers.c
parent08eec7a6bd5edc0fd1cae7f98d7788ea3905a467 (diff)
downloadlibsurvive-f0c26bd1b0b8ffe05c0c5f04567a9b7aa47c3e6b.tar.gz
libsurvive-f0c26bd1b0b8ffe05c0c5f04567a9b7aa47c3e6b.tar.bz2
Update dclapack to do automatic size-of-array'ing
Diffstat (limited to 'redist/dclhelpers.c')
-rw-r--r--redist/dclhelpers.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/redist/dclhelpers.c b/redist/dclhelpers.c
index 9fa9266..c3725f8 100644
--- a/redist/dclhelpers.c
+++ b/redist/dclhelpers.c
@@ -69,34 +69,40 @@ void dcldgemm(
int k,
DCL_FLOAT alpha,
const DCL_FLOAT* A,
- int lda, //must be n
+ int Ac, //must be n
const DCL_FLOAT* B,
- int ldb, //must be m
+ int Bc, //must be m
DCL_FLOAT beta,
- const DCL_FLOAT * C,
- int ldc //must be n
+ DCL_FLOAT * C,
+ int Cc //must be n
)
{
const DCL_FLOAT * ta;
const DCL_FLOAT * tb;
+ int tac = Ac;
+ int tbc = Bc;
if( transA )
{
- ta = alloca( sizeof( DCL_FLOAT ) * n * m );
- //TRANSP( ta, A, n, m );
+ DCL_FLOAT * la = alloca( sizeof( DCL_FLOAT ) * n * m );
+ const int lac = m;
+ TRANSP( la, A, n, m );
+ ta = la;
+ tac = lac;
}
else
ta = A;
if( transB )
{
- tb = alloca( sizeof( DCL_FLOAT ) * n * m );
- //TRANSP( tb, B, n, m );
+ DCL_FLOAT * lb = alloca( sizeof( DCL_FLOAT ) * n * m );
+ const int lbc = m;
+ TRANSP( lb, B, n, m );
+ tb = lb;
+ tbc = lbc;
}
else
tb = B;
-
- //XXX Tricky: In here, A is mxn
-
+ GMULADD(C,ta,tb,C,alpha,beta,n,m,k);
}