#include "common.h" #define MADD_ALPHA_N_STORE(C, res, alpha) \ C[0] = res ## _r * alpha ## _r - res ## _i * alpha ## _i; \ C[1] = res ## _r * alpha ## _i + res ## _i * alpha ## _r; #if defined(NN) || defined(NT) || defined(TN) || defined(TT) #define MADD(res, op1, op2) \ res ## _r += op1 ## _r * op2 ## _r; \ res ## _r -= op1 ## _i * op2 ## _i; \ res ## _i += op1 ## _r * op2 ## _i; \ res ## _i += op1 ## _i * op2 ## _r; #elif defined(NR) || defined(NC) || defined(TR) || defined(TC) #define MADD(res, op1, op2) \ res ## _r += op1 ## _r * op2 ## _r; \ res ## _r += op1 ## _i * op2 ## _i; \ res ## _i -= op1 ## _r * op2 ## _i; \ res ## _i += op1 ## _i * op2 ## _r; #elif defined(RN) || defined(RT) || defined(CN) || defined(CT) #define MADD(res, op1, op2) \ res ## _r += op1 ## _r * op2 ## _r; \ res ## _r += op1 ## _i * op2 ## _i; \ res ## _i += op1 ## _r * op2 ## _i; \ res ## _i -= op1 ## _i * op2 ## _r; #elif defined(RR) || defined(RC) || defined(CR) || defined(CC) #define MADD(res, op1, op2) \ res ## _r += op1 ## _r * op2 ## _r; \ res ## _r -= op1 ## _i * op2 ## _i; \ res ## _i -= op1 ## _r * op2 ## _i; \ res ## _i -= op1 ## _i * op2 ## _r; #endif int CNAME(BLASLONG bm,BLASLONG bn,BLASLONG bk,FLOAT alpha_r, FLOAT alpha_i,FLOAT* ba,FLOAT* bb,FLOAT* C,BLASLONG ldc , BLASLONG offset ) { BLASLONG i,j,k; FLOAT *C0,*C1,*C2,*C3,*ptrba,*ptrbb; FLOAT res00_r, res01_r, res02_r, res03_r; FLOAT res00_i, res01_i, res02_i, res03_i; FLOAT res10_r, res11_r, res12_r, res13_r; FLOAT res10_i, res11_i, res12_i, res13_i; FLOAT res20_r, res21_r, res22_r, res23_r; FLOAT res20_i, res21_i, res22_i, res23_i; FLOAT res30_r, res31_r, res32_r, res33_r; FLOAT res30_i, res31_i, res32_i, res33_i; FLOAT a0_r, a1_r; FLOAT a0_i, a1_i; FLOAT b0_r, b1_r, b2_r, b3_r; FLOAT b0_i, b1_i, b2_i, b3_i; BLASLONG off, temp; #if defined(TRMMKERNEL) && !defined(LEFT) off = -offset; #endif for (j=0; j