5 #if !defined(USE_CBLAS)
7 #define tensor_dot PREFIXED_NAME(tensor_dot )
8 #define tensor_mtxm PREFIXED_NAME(tensor_mtxm)
15 for(;
n;--
n) sum += *a++ * *b++;
19 # if defined(USE_NAIVE_BLAS)
20 # define tensor_mxv PREFIXED_NAME(tensor_mxv )
21 # define tensor_mtxv PREFIXED_NAME(tensor_mtxv)
22 # define tensor_mxm PREFIXED_NAME(tensor_mxm )
30 for(i=0;i<ny;++
i) y[i]=0;
32 const double xk = *x++;
33 for(i=0;i<ny;++
i) y[i] += (*A++)*xk;
45 double sum = *A++ * *xp++;
46 for(--n;
n;--
n) sum += *A++ * *xp++;
57 for(i=0;i<nc*nb;++
i) C[i]=0;
58 for(j=0;j<nb;++j,C+=nc) {
61 const double b = *B++;
62 for(i=0;i<nc;++
i) C[i] += (*A_++) * b;
75 for(j=0;j<nb;++j,B+=na) {
77 for(i=0;i<nc;++
i,A_+=na) *C++ =
tensor_dot(A_,B,na);
static double sum(struct xxt *data, double v, uint n, uint tag)
static void tensor_mxv(double *y, uint ny, const double *A, const double *x, uint nx)
static void tensor_mtxv(double *y, uint ny, const double *A, const double *x, uint nx)
static void tensor_mxm(double *C, uint nc, const double *A, uint na, const double *B, uint nb)
establishes some macros to establish naming conventions
static double y[NR *NS *NT *N]