 Timestamp:
 12/04/11 22:08:32 (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/wezzy/linbox/algorithms/openclkernels/kernel_muladd_partial_8_dp.cl
r4072 r4090 9 9 #pragma OPENCL EXTENSION cl_khr_fp64 : enable 10 10 11 __kernel void matrix_mul_kernel(__global double* C, __global double* A, __global double* B,12 int width_A, int width_B, double mod){11 __kernel void matrix_mul_kernel(__global double* D, double alpha, __global double* A, __global double* B, 12 double beta, __global double* C, int width_A, int width_B, double mod){ 13 13 //Get Workgroup ID 14 14 int bx = get_group_id(0); … … 64 64 65 65 //Scale Dsub by alpha 66 Dsub = fmod((alpha * Dsub), mod); 66 Dsub = alpha * Dsub; 67 Dsub = fmod(Dsub, mod); 67 68 68 if(beta != 0.0){ 69 //Add C scaled by beta to Dsub 70 double Csub = fmod((beta * C[d + ty * width_B + tx]), mod); 71 Dsub = fmod((Dsub + Csub), mod); 72 } 69 //Scalse Csub by beta 70 double Csub = C[d + ty * width_B + tx]; 71 Csub = beta * Csub; 72 Csub = fmod(Csub, mod); 73 74 //Add Dsub and Dsub 75 Dsub = Dsub + Csub; 76 Dsub = fmod(Dsub, mod); 73 77 74 78 //Add the sum to the appropriate spot
Note: See TracChangeset
for help on using the changeset viewer.