Skip to content

Commit 50ee4c4

Browse files
authored
fix compilation (#8)
1 parent 1f49003 commit 50ee4c4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/SofaCUDALinearSolver/CUDACholeksySparseSolver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <SofaCUDALinearSolver/CUDACholeksySparseSolver.inl>
2424
#include <sofa/component/linearsolver/iterative/MatrixLinearSolver.inl>
2525
#include <sofa/component/linearsystem/MatrixProjectionMethod.inl>
26+
#include <sofa/component/linearsystem/MappedMassMatrixObserver.inl>
2627
#include <sofa/core/ObjectFactory.h>
2728

2829
namespace sofa::component::linearsolver::direct
@@ -38,6 +39,8 @@ int CUDASparseCholeskySolverClass = core::RegisterObject("Direct linear solver b
3839
;
3940

4041
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> >;
4144
template class SOFACUDALINEARSOLVER_API sofa::component::linearsolver::MatrixLinearSolver< CompressedRowSparseMatrix<OtherFloatingType>,FullVector<OtherFloatingType> > ;
4245
template class SOFACUDALINEARSOLVER_API sofa::component::linearsolver::MatrixLinearSolver< CompressedRowSparseMatrix<sofa::type::Mat<3, 3, OtherFloatingType> >,FullVector<OtherFloatingType> > ;
4346

src/SofaCUDALinearSolver/CUDACholeksySparseSolver.inl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#pragma once
2323

2424
#include <SofaCUDALinearSolver/CUDACholeksySparseSolver.h>
25+
#include <sofa/component/linearsolver/iterative/MatrixLinearSolver.inl>
2526
#include <sofa/helper/ScopedAdvancedTimer.h>
2627
#include <SofaCUDALinearSolver/utils.h>
2728
#include <cusparse.h>
@@ -36,11 +37,11 @@ CUDASparseCholeskySolver<TMatrix,TVector>::CUDASparseCholeskySolver()
3637
, d_typePermutation(initData(&d_typePermutation, "permutation", "Type of fill-in reducing permutation"))
3738
, d_hardware(initData(&d_hardware, "hardware", "On which hardware to solve the linear system: CPU or GPU"))
3839
{
39-
sofa::helper::OptionsGroup typePermutationOptions{"None","RCM" ,"AMD", "METIS"};
40+
sofa::helper::OptionsGroup typePermutationOptions{{"None","RCM" ,"AMD", "METIS"}};
4041
typePermutationOptions.setSelectedItem(0); // default None
4142
d_typePermutation.setValue(typePermutationOptions);
4243

43-
sofa::helper::OptionsGroup hardwareOptions{"CPU", "GPU"};
44+
sofa::helper::OptionsGroup hardwareOptions{{"CPU", "GPU"}};
4445
hardwareOptions.setSelectedItem(1);
4546
d_hardware.setValue(hardwareOptions);
4647

0 commit comments

Comments
 (0)