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

kernels.double.cosinesimilarity_strided.kh Maven / Gradle / Ivy

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


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


/**
 An op on the device
 @param d1 the first operator
 @param d2 the second operator
*/
__global  double op(double d1,double d2,double *extraParams) {
      return d1 * d2;
}


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

extern "C"
__kernel void cosinesimilarity_strided_double(int n, int xOffset,int yOffset,double *dx,double *dy,int incx,int incy,double *extraParams,double *result) {
              transform_pair(n,xOffset,yOffset,dx,dy,incx,incy,extraParams,result);

 }






© 2015 - 2025 Weber Informatics LLC | Privacy Policy