54 {
55 if(argc != 3) {
56 std::cerr << "Usage: 1.(This) 2.(rows) 3.(cols)\n"
57 << " argc=" << argc << std::endl;
58 std::exit(EXIT_FAILURE);
59 }
60 int const rows = std::atoi(argv[1]);
61 int const cols = std::atoi(argv[2]);
62
63 std::mt19937 mt;
64 std::normal_distribution<double> Gaussian;
65
67 cuCHECK(cudaDeviceSetLimit(cudaLimitMallocHeapSize,
size_t(16) *
size_t(1024 * 1024 * 1024)));
68
69
70 {
72
73 std::cout << "Passed the test point 1.\n" << std::endl;
74 }
75 {
77 std::cout << "Passed the test point 3.\n" << std::endl;
78 }
79
80
81 {
83 Eigen::MatrixX<Scalar> hMat = Eigen::MatrixX<Scalar>::NullaryExpr(
86
88 std::cout << "Passed the test point 4 (Move).\n" << std::endl;
89 }
90
91
92 {
94 Eigen::MatrixX<Scalar> hMat = Eigen::MatrixX<Scalar>::NullaryExpr(
97
100 << std::endl;
101 std::cout << "Passed the test point 5.\n" << std::endl;
102 }
103
104 {
106 Eigen::MatrixX<Scalar> hMat = Eigen::MatrixX<Scalar>::NullaryExpr(
108 hMat = (hMat + hMat.adjoint().eval()) / 2.0;
110
111 hMat = Eigen::MatrixX<Scalar>::NullaryExpr(
113 hMat = (hMat + hMat.adjoint().eval()) / 2.0;
115
116 std::cout << dMat1 << std::endl;
117 std::cout << dMat2 << std::endl;
118 std::cout << "After multiplication\n" << dMat1 * dMat2 << std::endl;
119 std::cout << "Passed the test point 5.\n" << std::endl;
120 }
121
122 return EXIT_SUCCESS;
123}
double MeanLevelSpasingsRatio(Eigen::VectorX< RealScalar > const &eigvecs)
Definition ObjectOnGPU_EigenMatrix_test.cu:37
Definition mytypes.hpp:147
Definition ObjectOnGPU_EigenMatrix_test.cu:28
static MagmaController & getInstance()
Definition ObjectOnGPU_EigenMatrix_test.cu:14
Definition MatrixUtils.hpp:20
Definition ObjectOnGPU.cuh:149
cuCHECK(cudaFuncGetAttributes(&attr, MatrixElementsInSector))
__constant__ int cols
Definition testEigenOnGPU.cu:6
__constant__ int rows
Definition testEigenOnGPU.cu:5