Blame view

cudafunc.cu 1.6 KB
40d11588   Tianshu Cheng   2D inseparable co...
1
  #include <stim/cuda/arraymath.cuh>
6dcc460e   Tianshu Cheng   cPb+tPb
2
3
4
  #include <stim/cuda/templates/conv2.cuh>
  #include <stim/cuda/templates/conv2sep.cuh>
  #include <stim/cuda/templates/chi_gradient.cuh>
40d11588   Tianshu Cheng   2D inseparable co...
5
6
7
8
9
10
11
12
13
14
15
16
  
  void array_multiply(float* lhs, float rhs, unsigned int N){
  
  	stim::cuda::cpu_multiply(lhs, rhs, N);
  }
  
  void array_add(float* ptr1, float* ptr2, float* sum, unsigned int N){
  
  	stim::cuda::cpu_add(ptr1, ptr2, sum, N);
  
  }
  
6dcc460e   Tianshu Cheng   cPb+tPb
17
18
19
20
21
22
  void array_multiply(float* ptr1, float* ptr2, float* product, unsigned int N){
  
  	stim::cuda::cpu_add(ptr1, ptr2, product, N);
  
  }
  
40d11588   Tianshu Cheng   2D inseparable co...
23
24
25
26
27
28
29
30
31
32
33
34
  void conv2(float* img, float* mask, float* cpu_copy, unsigned int w, unsigned int h, unsigned int M){
  
  	stim::cuda::cpu_conv2(img, mask, cpu_copy, w, h, M);
  
  }
  
  void array_abs(float* img, unsigned int N){
  
  	stim::cuda::cpu_abs(img, N);
  
  }
  
6dcc460e   Tianshu Cheng   cPb+tPb
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  void conv2_sep(float* img, unsigned int x, unsigned int y, float* kernel0, unsigned int k0, float* kernel1, unsigned int k1){
  
  	stim::cuda::cpu_conv2sep(img, x, y, kernel0, k0, kernel1, k1);
  
  }
  
  void array_cos(float* ptr1, float* cpu_out, unsigned int N){
  
  	stim::cuda::cpu_cos(ptr1, cpu_out, N);
  
  }
  
  void array_sin(float* ptr1, float* cpu_out, unsigned int N){
  
  	stim::cuda::cpu_sin(ptr1, cpu_out, N);
  
  }
  
  void array_atan(float* ptr1, float* cpu_out, unsigned int N){
  
  	stim::cuda::cpu_atan(ptr1, cpu_out, N);
  
  }
  
  void array_divide(float* ptr1, float* ptr2,float* cpu_quotient, unsigned int N){
  
  	stim::cuda::cpu_divide(ptr1, ptr2, cpu_quotient, N);
  
  }
  
  void chi_grad(float* img, float* cpu_copy, unsigned int w, unsigned int h, int r, unsigned int bin_n, unsigned int bin_size, float theta){
  
  	stim::cuda::cpu_chi_grad(img, cpu_copy, w, h, r, bin_n, bin_size, theta);
  
  }