Skip to content

Commit

Permalink
Clean up Riemann fit in CA (#178)
Browse files Browse the repository at this point in the history
Reduce the number of blocks used to launch the Riemann fit kernels within the CA.
Rename the kernels to avoid the ambiguiity with the standalone Riemann fit.
Work around spurious warnings in the Eigen test.
  • Loading branch information
fwyzard committed Nov 6, 2020
1 parent 167246b commit e0ded88
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions RecoPixelVertexing/PixelTrackFitting/test/testEigenGPUNoFit.cu
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ void testMultiply() {
kernelMultiply<<<1,1>>>(JGPU, CGPU, multiply_resultGPU);
cudaDeviceSynchronize();

cudaMemcpy(multiply_resultGPUret, multiply_resultGPU,
cudaMemcpy(multiply_resultGPUret, multiply_resultGPU,
sizeof(Eigen::Matrix<double, row1, col2>), cudaMemcpyDeviceToHost);
printIt(multiply_resultGPUret);
assert(isEqualFuzzy(multiply_result, (*multiply_resultGPUret)));
}

void testInverse3x3() {
std::cout << "TEST INVERSE 3x3" << std::endl;
Matrix3d m = Matrix3d::Random();
Matrix3d m;
fillMatrix(m);
m += m.transpose().eval();

Matrix3d m_inv = m.inverse();
Matrix3d *mGPU = nullptr;
Matrix3d *mGPUret = nullptr;
Expand All @@ -117,7 +120,10 @@ void testInverse3x3() {

void testInverse4x4() {
std::cout << "TEST INVERSE 4x4" << std::endl;
Matrix4d m = Matrix4d::Random();
Matrix4d m;
fillMatrix(m);
m += m.transpose().eval();

Matrix4d m_inv = m.inverse();
Matrix4d *mGPU = nullptr;
Matrix4d *mGPUret = nullptr;
Expand All @@ -143,9 +149,10 @@ void testInverse4x4() {

void testEigenvalues() {
std::cout << "TEST EIGENVALUES" << std::endl;
Matrix3d m = Matrix3d::Random();
Matrix3d mt = m.transpose();
m += mt;
Matrix3d m;
fillMatrix(m);
m += m.transpose().eval();

Matrix3d * m_gpu = nullptr;
Matrix3d * mgpudebug = new Matrix3d();
Eigen::SelfAdjointEigenSolver<Matrix3d>::RealVectorType *ret = new Eigen::SelfAdjointEigenSolver<Matrix3d>::RealVectorType;
Expand Down

0 comments on commit e0ded88

Please sign in to comment.