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

Functions

__global__ void testHilbertSpace_kernel (int dim)
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)
13 {
14 if(argc != 2) {
15 std::cerr << "Usage: 1.(This) 2.(dim)\n"
16 << " argc=" << argc << std::endl;
17 std::exit(EXIT_FAILURE);
18 }
19 int const dim = std::atoi(argv[1]);
20
21 testHilbertSpace_kernel<<<1, 1>>>(dim);
22 cuCHECK(cudaGetLastError());
23 cuCHECK(cudaDeviceSynchronize());
24 std::cout << "Passed \"testHilbertSpace_kernel\"\n" << std::endl;
25
26 return EXIT_SUCCESS;
27}
cuCHECK(cudaFuncGetAttributes(&attr, MatrixElementsInSector))

◆ testHilbertSpace_kernel()

__global__ void testHilbertSpace_kernel ( int  dim)
6 {
7 int const idx = blockIdx.x * blockDim.x + threadIdx.x;
8 if(idx > 1) return;
9 HilbertSpace<int> hSpace(dim);
10 debug_printf("%s:\n\t dim=%d, hSpace.dim()=%d\n", __PRETTY_FUNCTION__, dim, hSpace.dim());
11}
Definition HilbertSpace.hpp:32