Skip to content

Commit 4d5a61b

Browse files
authored
fix compilation with gcc (#9)
1 parent 50ee4c4 commit 4d5a61b

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/SofaCUDALinearSolver/CUDACholeksySparseSolver.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,23 @@ int CUDASparseCholeskySolverClass = core::RegisterObject("Direct linear solver b
3838
.add< CUDASparseCholeskySolver< CompressedRowSparseMatrix<sofa::type::Mat<3, 3, double> >,FullVector<double> > >()
3939
;
4040

41-
using OtherFloatingType = std::conditional_t<std::is_same_v<SReal, double>, float, double>;
42-
template struct SOFACUDALINEARSOLVER_API sofa::component::linearsystem::MappedMassMatrixObserver<OtherFloatingType>;
43-
template class SOFACUDALINEARSOLVER_API sofa::component::linearsystem::MatrixProjectionMethod<sofa::linearalgebra::CompressedRowSparseMatrix<OtherFloatingType> >;
44-
template class SOFACUDALINEARSOLVER_API sofa::component::linearsolver::MatrixLinearSolver< CompressedRowSparseMatrix<OtherFloatingType>,FullVector<OtherFloatingType> > ;
45-
template class SOFACUDALINEARSOLVER_API sofa::component::linearsolver::MatrixLinearSolver< CompressedRowSparseMatrix<sofa::type::Mat<3, 3, OtherFloatingType> >,FullVector<OtherFloatingType> > ;
46-
4741
template class SOFACUDALINEARSOLVER_API CUDASparseCholeskySolver< CompressedRowSparseMatrix<float>,FullVector<float> > ;
4842
template class SOFACUDALINEARSOLVER_API CUDASparseCholeskySolver< CompressedRowSparseMatrix<sofa::type::Mat<3, 3, float> >,FullVector<float> > ;
4943
template class SOFACUDALINEARSOLVER_API CUDASparseCholeskySolver< CompressedRowSparseMatrix<double>,FullVector<double> > ;
5044
template class SOFACUDALINEARSOLVER_API CUDASparseCholeskySolver< CompressedRowSparseMatrix<sofa::type::Mat<3, 3, double> >,FullVector<double> > ;
5145

5246
} // namespace sofa::component::linearsolver::direct
47+
48+
using OtherFloatingType = std::conditional_t<std::is_same_v<SReal, double>, float, double>;
49+
50+
namespace sofa::component::linearsystem
51+
{
52+
template struct SOFACUDALINEARSOLVER_API MappedMassMatrixObserver<OtherFloatingType>;
53+
template class SOFACUDALINEARSOLVER_API MatrixProjectionMethod<sofa::linearalgebra::CompressedRowSparseMatrix<OtherFloatingType> >;
54+
}
55+
56+
namespace sofa::component::linearsolver
57+
{
58+
template class SOFACUDALINEARSOLVER_API MatrixLinearSolver< CompressedRowSparseMatrix<OtherFloatingType>,FullVector<OtherFloatingType> > ;
59+
template class SOFACUDALINEARSOLVER_API MatrixLinearSolver< CompressedRowSparseMatrix<sofa::type::Mat<3, 3, OtherFloatingType> >,FullVector<OtherFloatingType> > ;
60+
}

0 commit comments

Comments
 (0)