All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kernels.double.bias_strided.cu Maven / Gradle / Ivy

There is a newer version: 0.4-rc3.7
Show newest version
#include "reduce.h"

__device__ double merge(double old,double opOutput,double *extraParams) {
       return opOutput + old;
 }

__device__ double update(double old,double opOutput,double *extraParams) {
       return opOutput + old;
 }


/**
 An op on the device
 @param d1 the first operator
 @param d2 the second operator
*/
__device__ double op(double d1,double d2,double *extraParams) {
      return op(d1,extraParams);
}
//an op for the kernel
__device__ double op(double d1,double *extraParams) {
       double mean = extraParams[1];
       double curr = (d1 - mean);
       return  curr;

}

//post process result (for things like means etc)
__device__ double postProcess(double reduction,int n,int xOffset,double *dx,int incx,double *extraParams,double *result) {
          return reduction;
}

extern "C"
__global__ void bias_strided_double(int n, int xOffset,double *dx,int incx,double *extraParams,double *result) {
              transform(n,xOffset,dx,incx,extraParams,result);

 }






© 2015 - 2024 Weber Informatics LLC | Privacy Policy