-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathfbridge.cu
41 lines (34 loc) · 1.03 KB
/
fbridge.cu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "bridge.h"
#ifdef __CUDACC__
/**
* The C++ function instantiating the Bridge class with all necessary parameters
* and calling the host_sequence function to execute the Cuda/C++ code for the
* matrix element calculation
*/
void cubridge(double *momenta, double *mes) {
Bridge<double> b = Bridge<double>(16, 4, 4, 4, 16);
b.gpu_sequence(momenta, mes);
}
extern "C" {
/**
* The C symbol being called from the fortran code (in audo_dsig1.f)
*/
void fcubridge_(double *mom, double *mes) { cubridge(mom, mes); }
}
#else
/**
* The C++ function instantiating the Bridge class with all necessary parameters
* and calling the host_sequence function to execute the Cuda/C++ code for the
* matrix element calculation
*/
void cppbridge(double *momenta, double *mes) {
Bridge<double> b = Bridge<double>(16, 4, 4, 4, 16);
b.cpu_sequence(momenta, mes);
}
extern "C" {
/**
* The C symbol being called from the fortran code (in audo_dsig1.f)
*/
void fcppbridge_(double *mom, double *mes) { cppbridge(mom, mes); }
}
#endif // __CUDACC__