Feat C++ API
A feature engineering automation tool
kernels.h
Go to the documentation of this file.
1 /* FEWTWO
2 copyright 2017 William La Cava
3 license: GNU/GPL v3
4 */
5 #ifndef KERNELS
6 #define KERNELS
7 namespace FT{
8  namespace Pop{
9  namespace Op{
10  // math operators
11  void GPU_Add(float * x, size_t idx, size_t N, float W0, float W1);
12  void GPU_Subtract(float * x, size_t idx, size_t N, float W0, float W1);
13  void GPU_Multiply(float * x, size_t idx, size_t N, float W0, float W1);
14  void GPU_Divide(float * x, size_t idx, size_t N, float W0, float W1);
15  void GPU_Exp(float * x, size_t idx, size_t N, float W0);
16  void GPU_Log(float * x, size_t idx, size_t N, float W0);
17  void GPU_Sin(float * x, size_t idx, size_t N, float W0);
18  void GPU_Cos(float * x, size_t idx, size_t N, float W0);
19  void GPU_Sqrt(float * x, size_t idx, size_t N, float W0);
20  void GPU_Square(float * x, size_t idx, size_t N, float W0);
21  void GPU_Cube(float * x, size_t idx, size_t N, float W0);
22  void GPU_Exponent(float * x, size_t idx, size_t N, float W0, float W1);
23  void GPU_Logit(float * x, size_t idx, size_t N, float W0);
24  void GPU_Step(float * x, size_t idx, size_t N);
25  void GPU_Sign(float * x, size_t idx, size_t N);
26  void GPU_Tanh(float * x, size_t idx, size_t N, float W0);
27  void GPU_Gaussian(float * x, size_t idx, size_t N, float W0);
28  void GPU_Gaussian2D(float * x, size_t idx,
29  float x1mean, float x1var,
30  float x2mean, float x2var,
31  float W0, float W1, size_t N);
32  void GPU_Relu(float * x, size_t idx, size_t N, float W0);
33  void GPU_Float(float * x, bool* y, size_t idxf, size_t idxb, size_t N);
34  void GPU_Float(float * x, int* y, size_t idxf, size_t idxb, size_t N);
35 
36  // boolean operators
37  void GPU_And(bool * x, size_t idx, size_t N);
38  void GPU_Or(bool * x, size_t idx, size_t N);
39  void GPU_Not(bool * x, size_t idx, size_t N);
40  void GPU_Xor(bool * x, size_t idx, size_t N);
41  void GPU_GEQ(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N);
42  void GPU_LEQ(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N);
43  void GPU_Equal(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N);
44  void GPU_LessThan(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N);
45  void GPU_GreaterThan(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N);
46  void GPU_If(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N);
47  void GPU_IfThenElse(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N);
48 
49  //learn
50  void GPU_Split(float * xf, bool * xb, size_t idxf, size_t idxb, size_t N, float threshold);
51  void GPU_Split(int * xi, bool * xb, size_t idxi, size_t idxb, size_t N, float threshold);
52 
53  // leaves
54  void GPU_Constant(float * dev_x, float value, size_t idx, size_t N);
55  void GPU_Constant(bool * dev_x, bool value, size_t idx, size_t N);
56  void GPU_Variable(float * dev_x, float * host_x, size_t idx, size_t N);
57  void GPU_Variable(int * dev_x, int * host_x, size_t idx, size_t N);
58  void GPU_Variable(bool * dev_x, bool * host_x, size_t idx, size_t N);
59  }
60  }
61 }
62 #endif
void GPU_Float(float *x, bool *y, size_t idxf, size_t idxb, size_t N)
void GPU_Gaussian(float *x, size_t idx, size_t N, float W0)
void GPU_Gaussian2D(float *x, size_t idx, float x1mean, float x1var, float x2mean, float x2var, float W0, float W1, size_t N)
void GPU_Add(float *x, size_t idx, size_t N, float W0, float W1)
void GPU_Sqrt(float *x, size_t idx, size_t N, float W0)
void GPU_Exp(float *x, size_t idx, size_t N, float W0)
void GPU_LessThan(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N)
void GPU_Logit(float *x, size_t idx, size_t N, float W0)
void GPU_Step(float *x, size_t idx, size_t N)
void GPU_Tanh(float *x, size_t idx, size_t N, float W0)
void GPU_Or(bool *x, size_t idx, size_t N)
void GPU_Cube(float *x, size_t idx, size_t N, float W0)
void GPU_Multiply(float *x, size_t idx, size_t N, float W0, float W1)
void GPU_Not(bool *x, size_t idx, size_t N)
void GPU_LEQ(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N)
void GPU_If(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N)
void GPU_Exponent(float *x, size_t idx, size_t N, float W0, float W1)
void GPU_Divide(float *x, size_t idx, size_t N, float W0, float W1)
void GPU_Sign(float *x, size_t idx, size_t N)
void GPU_Sin(float *x, size_t idx, size_t N, float W0)
void GPU_GreaterThan(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N)
void GPU_Log(float *x, size_t idx, size_t N, float W0)
void GPU_Constant(float *dev_x, float value, size_t idx, size_t N)
void GPU_GEQ(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N)
void GPU_Xor(bool *x, size_t idx, size_t N)
void GPU_Cos(float *x, size_t idx, size_t N, float W0)
void GPU_IfThenElse(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N)
void GPU_Equal(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N)
void GPU_Split(float *xf, bool *xb, size_t idxf, size_t idxb, size_t N, float threshold)
void GPU_Relu(float *x, size_t idx, size_t N, float W0)
void GPU_Subtract(float *x, size_t idx, size_t N, float W0, float W1)
void GPU_Square(float *x, size_t idx, size_t N, float W0)
void GPU_And(bool *x, size_t idx, size_t N)
void GPU_Variable(float *dev_x, float *host_x, size_t idx, size_t N)
main Feat namespace
Definition: data.cc:13