StatMech
Loading...
Searching...
No Matches
Bit_gpu.cu File Reference

Functions

__global__ void Bit_gpu (Integer_t const index, Integer_t const pos, Integer_t const dloc, Integer_t const n)
 
__global__ void cuda_hello ()
 
int main (int argc, char **argv)
 

Function Documentation

◆ Bit_gpu()

__global__ void Bit_gpu ( Integer_t const  index,
Integer_t const  pos,
Integer_t const  dloc,
Integer_t const  n 
)
8 {
9 printf("%lld = Bit(%lld,%lld,%lld,%lld)\n", Bit(index, pos, dloc, n), index, pos, dloc, n);
10}

◆ cuda_hello()

__global__ void cuda_hello ( )
12 {
13 printf("Hello World from GPU!\n");
14}

◆ main()

int main ( int  argc,
char **  argv 
)
16 {
17 if(argc != 5) {
18 std::cerr << "Usage: Bit(Integer_t const index, Integer_t const pos, Integer_t const dloc, Integer_t const n)" << std::endl;
19 std::exit(EX_USAGE);
20 }
21 Integer_t index = (Integer_t)std::atoi(argv[1]);
22 Integer_t pos = (Integer_t)std::atoi(argv[2]);
23 Integer_t dloc = (Integer_t)std::atoi(argv[3]);
24 Integer_t n = (Integer_t)std::atoi(argv[4]);;
25
26 Bit_gpu<<<1,1>>>(index, pos, dloc, n);
27 cudaDeviceSynchronize();
28 return 0;
29}
MKL_INT Integer_t
Definition mytypes.hpp:359