Ignore:
Timestamp:
12/04/11 22:08:32 (2 years ago)
Author:
wezowicz
Message:

Fixed memory leak in opencl-domain-memory.inl.
Add OpenCL specialization to muladd() along with 8 more kernels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/wezzy/linbox/algorithms/opencl-kernels/kernel_muladd_modulus_sp.cl

    r4072 r4090  
    11/* 
    2  * kernel_modulus_dp.cl 
     2 * kernel_modulus_sp.cl 
    33 * 
    44 *  Created on: Jul 5, 2011 
     
    77 
    88#define BLOCK_SIZE 16 
    9 #pragma OPENCL EXTENSION cl_khr_fp64 : enable 
    109 
    1110__kernel void matrix_mul_kernel(__global float* D, float alpha, __global float* A, __global float* B, 
     
    6059         
    6160        //Scale Dsub by alpha 
    62         Dsub = fmod((alpha * Dsub), mod); 
     61        Dsub = alpha * Dsub; 
     62        Dsub = fmod(Dsub, mod); 
    6363         
    64         if(beta != 0.0){ 
    65                 //Add C scaled by beta to Dsub 
    66                 float Csub = fmod((beta * C[d + ty * width_B + tx]), mod); 
    67                 Dsub = fmod((Dsub + Csub), mod); 
    68         } 
     64        //Scalse Csub by beta 
     65        float Csub = C[d + ty * width_B + tx]; 
     66        Csub = beta * Csub; 
     67        Csub = fmod(Csub, mod); 
     68         
     69        //Add Dsub and Dsub 
     70        Dsub = Dsub + Csub; 
     71        Dsub = fmod(Dsub, mod); 
    6972         
    7073        //Add the sum to the appropriate spot 
Note: See TracChangeset for help on using the changeset viewer.