Caffe2 - C++ API
A deep learning, cross platform ML framework
cudalib.c
1 #include <TH/TH.h>
2 #include <THC/THC.h>
3 
4 extern THCState *state;
5 
6 #include "../cpu/lib1.c"
7 
8 void cuda_func(THCudaTensor *tensor, int a, float b)
9 {
10  THCudaTensor_mul(state, tensor, tensor, a);
11  THCudaTensor_add(state, tensor, tensor, b);
12 }