62 {
63 if(argc != 2) {
64 std::cerr << "Usage: 1.This, 2.SystemSize" << std::endl;
65 std::exit(EXIT_FAILURE);
66 }
67 int L = std::atoi(argv[1]);
68 int dimLoc = 2, k = 0;
69
71 cudaDeviceGetLimit(&
size, cudaLimitMallocHeapSize);
72 printf(
"Heap Size=%ld\n",
size);
73 size = 1024 * 1024 * 1024;
74 cudaDeviceSetLimit(cudaLimitMallocHeapSize, size_t(4) * size_t(1024 * 1024 * 1024));
76 struct cudaFuncAttributes
attr;
78 std::cout << "# Function: testObject_kernel(TransSector<float>*)"
79 << "\n"
80 <<
"# constSizeBytes = " <<
attr.constSizeBytes <<
"\n"
81 <<
"# localSizeBytes = " <<
attr.localSizeBytes <<
"\n"
82 <<
"# maxDynamicSharedSizeBytes = " <<
attr.maxDynamicSharedSizeBytes <<
"\n"
83 <<
"# maxThreadsPerBlock = " <<
attr.maxThreadsPerBlock <<
"\n"
84 <<
"# sharedSizeBytes = " <<
attr.sharedSizeBytes << std::endl;
85
87 testObject_kernel<<<1, 1>>>(dTransSector.ptr());
89 cuCHECK(cudaDeviceSynchronize());
90 std::cout << "Constructed an instance of ObjectOnGPU< TransSector<float> >" << std::endl;
91
93 adjointBasis_kernel<<<1, 1>>>(adjointBasis.
ptr(), dTransSector.ptr());
95 cuCHECK(cudaDeviceSynchronize());
96
97 testObject_kernel<<<1, 1>>>(adjointBasis.
ptr());
99 cuCHECK(cudaDeviceSynchronize());
100
101 return EXIT_SUCCESS;
102}
__global__ void testObject_kernel(TransSector< Scalar_t > *transSectorPtr)
Definition TransSectorOnGPU.cu:15
Object_t * ptr() const
Definition ObjectOnGPU.cuh:144
Definition ObjectOnGPU.cuh:149
Translation invariant sector of a many-body Hilbert space.
Definition TransSector.hpp:19
cuCHECK(cudaFuncGetAttributes(&attr, MatrixElementsInSector))
struct cudaFuncAttributes attr
Definition getAttributesOfMatrixElementsInSector.cpp:2
__constant__ int size
Definition testEigenOnGPU.cu:4