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

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)
11 {
12 if(argc != 4) {
13 std::cerr << "Usage: 1.(This) 2.(m) 3.(sysSize) 4.(dimLoc)\n"
14 << " argc=" << argc << std::endl;
15 std::exit(EXIT_FAILURE);
16 }
17 int const m = std::atoi(argv[1]);
18 int const sysSize = std::atoi(argv[2]);
19 int const dimLoc = std::atoi(argv[3]);
20
21 mBodyOperatorSpace<Complex_t<double>> hMBOpSpace(m, ManyBodySpinSpace(sysSize, dimLoc));
22 {
23 // Testing the default constructor
25 // Testing the move assignment operator
26 dMBOpSpace = ObjectOnGPU< mBodyOperatorSpace<Complex_t<double>> >(hMBOpSpace);
27 std::cout << dMBOpSpace.ptr() << std::endl;
28 }
29
31
32 testManyBodySpaceBase_kernel<<<1, 1>>>(dMBOpSpace.ptr());
33 cuCHECK(cudaGetLastError());
34 cuCHECK(cudaDeviceSynchronize());
35 std::cout << "Passed \"testManyBodySpaceBase_kernel\"\n" << std::endl;
36
37 testOperatorSpaceBase_kernel<<<1, 1>>>(dMBOpSpace.ptr());
38 cuCHECK(cudaGetLastError());
39 cuCHECK(cudaDeviceSynchronize());
40 std::cout << "Passed \"testOperatorSpaceBase_kernel\"\n" << std::endl;
41
42 return EXIT_SUCCESS;
43}
Definition HilbertSpace.hpp:423
Object_t * ptr() const
Definition ObjectOnGPU.cuh:144
Definition ObjectOnGPU.cuh:149
Definition OperatorSpace.hpp:430
cuCHECK(cudaFuncGetAttributes(&attr, MatrixElementsInSector))