diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaLineModel.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaLineModel.cpp index 2a893fbd03c..2de5e8005ad 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaLineModel.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaLineModel.cpp @@ -41,13 +41,15 @@ template class SOFA_GPU_CUDA_API LineCollisionModelregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the LineCollisionModel") .add< component::collision::geometry::LineCollisionModel >() .add< component::collision::geometry::LineCollisionModel >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::collision::geometry::LineCollisionModel >() .add< component::collision::geometry::LineCollisionModel >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaPointModel.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaPointModel.cpp index 1bf05afcfe8..93419296975 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaPointModel.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaPointModel.cpp @@ -27,9 +27,11 @@ namespace sofa::gpu::cuda { -int CudaPointCollisionModelClass = core::RegisterObject("GPU-based point collision model using CUDA") + void registerPointCollisionModel(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the PointCollisionModel") .add< CudaPointCollisionModel >() - ; + } using namespace defaulttype; diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaSphereModel.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaSphereModel.cpp index 35f06d24fc9..791daa1ba69 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaSphereModel.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaSphereModel.cpp @@ -41,7 +41,9 @@ template class SOFA_GPU_CUDA_API SphereCollisionModelregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the SphereCollisionModel") .add< component::collision::geometry::SphereCollisionModel >() .add< component::collision::geometry::SphereCollisionModel >() #ifdef SOFA_GPU_CUDA_DOUBLE @@ -49,7 +51,8 @@ const int CudaSphereModelClass = core::RegisterObject("Supports GPU-side computa .add< component::collision::geometry::SphereCollisionModel >() #endif // SOFA_GPU_CUDA_DOUBLE .addAlias("CudaSphere") - .addAlias("CudaSphereModel"); + .addAlias("CudaSphereModel") + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaTriangleModel.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaTriangleModel.cpp index 4fe050ee685..a19e6cd6a8e 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaTriangleModel.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/geometry/CudaTriangleModel.cpp @@ -40,13 +40,15 @@ template class SOFA_GPU_CUDA_API TriangleCollisionModelregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TriangleCollisionModel") .add< component::collision::geometry::TriangleCollisionModel >() .add< component::collision::geometry::TriangleCollisionModel >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::collision::geometry::TriangleCollisionModel >() .add< component::collision::geometry::TriangleCollisionModel >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/response/contact/CudaPenalityContactForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/response/contact/CudaPenalityContactForceField.cpp index 636f1870587..c120cf62f90 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/response/contact/CudaPenalityContactForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/collision/response/contact/CudaPenalityContactForceField.cpp @@ -38,13 +38,15 @@ template class SOFA_GPU_CUDA_API PenalityContactForceField< CudaVec3d1Types>; namespace sofa::gpu::cuda { -int PenalityContactForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerPenalityContactForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the PenalityContactForceField") .add< sofa::component::collision::response::contact::PenalityContactForceField >() .add< sofa::component::collision::response::contact::PenalityContactForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::collision::response::contact::PenalityContactForceField >() .add< sofa::component::collision::response::contact::PenalityContactForceField >() #endif - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaLinearSolverConstraintCorrection.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaLinearSolverConstraintCorrection.cpp index fbcc3a43e66..c14db909691 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaLinearSolverConstraintCorrection.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaLinearSolverConstraintCorrection.cpp @@ -43,14 +43,16 @@ namespace sofa::gpu::cuda { using namespace sofa::component::constraint::lagrangian::correction; -const int CudaLinearSolverConstraintCorrectionClass = core::RegisterObject("Supports GPU-side computations using CUDA.") - .add< LinearSolverConstraintCorrection< CudaVec3fTypes > >() - .add< LinearSolverConstraintCorrection< CudaVec3f1Types > >() + void registerLinearSolverConstraintCorrection(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the LinearSolverConstraintCorrection") + .add< LinearSolverConstraintCorrection< CudaVec3fTypes > >() + .add< LinearSolverConstraintCorrection< CudaVec3f1Types > >() #ifdef SOFA_GPU_CUDA_DOUBLE - .add< LinearSolverConstraintCorrection< CudaVec3dTypes > >() - .add< LinearSolverConstraintCorrection< CudaVec3d1Types > >() + .add< LinearSolverConstraintCorrection< CudaVec3dTypes > >() + .add< LinearSolverConstraintCorrection< CudaVec3d1Types > >() #endif - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaPrecomputedConstraintCorrection.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaPrecomputedConstraintCorrection.cpp index e062a6dac89..f1b2a0f9936 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaPrecomputedConstraintCorrection.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaPrecomputedConstraintCorrection.cpp @@ -42,13 +42,15 @@ namespace sofa::gpu::cuda { using namespace sofa::component::constraint::lagrangian::correction; -const int CudaPrecomputedConstraintCorrectionClass = core::RegisterObject("Supports GPU-side computations using CUDA.") - .add< PrecomputedConstraintCorrection< CudaVec3fTypes > >() - .add< PrecomputedConstraintCorrection< CudaVec3f1Types > >() + void registerPrecomputedConstraintCorrection(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the PrecomputedConstraintCorrection") + .add< PrecomputedConstraintCorrection< CudaVec3fTypes > >() + .add< PrecomputedConstraintCorrection< CudaVec3f1Types > >() #ifdef SOFA_GPU_CUDA_DOUBLE - .add< PrecomputedConstraintCorrection< CudaVec3dTypes > >() - .add< PrecomputedConstraintCorrection< CudaVec3d1Types > >() + .add< PrecomputedConstraintCorrection< CudaVec3dTypes > >() + .add< PrecomputedConstraintCorrection< CudaVec3d1Types > >() #endif - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaUncoupledConstraintCorrection.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaUncoupledConstraintCorrection.cpp index f7eb5db0f49..4d633d60d67 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaUncoupledConstraintCorrection.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/correction/CudaUncoupledConstraintCorrection.cpp @@ -41,15 +41,17 @@ template class SOFA_GPU_CUDA_API UncoupledConstraintCorrection< CudaVec3d1Types namespace sofa::gpu::cuda { -using namespace sofa::component::constraint::lagrangian::correction; + using namespace sofa::component::constraint::lagrangian::correction; -const int CudaUncoupledConstraintCorrectionClass = core::RegisterObject("Supports GPU-side computations using CUDA.") -.add< UncoupledConstraintCorrection< CudaVec3fTypes > >() -.add< UncoupledConstraintCorrection< CudaVec3f1Types > >() + void registerUncoupledConstraintCorrection(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the UncoupledConstraintCorrection") + .add< UncoupledConstraintCorrection< CudaVec3fTypes > >() + .add< UncoupledConstraintCorrection< CudaVec3f1Types > >() #ifdef SOFA_GPU_CUDA_DOUBLE -.add< UncoupledConstraintCorrection< CudaVec3dTypes > >() -.add< UncoupledConstraintCorrection< CudaVec3d1Types > >() + .add< UncoupledConstraintCorrection< CudaVec3dTypes > >() + .add< UncoupledConstraintCorrection< CudaVec3d1Types > >() #endif -; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/model/CudaBilateralLagrangianConstraint.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/model/CudaBilateralLagrangianConstraint.cpp index c014599a76f..49351e66b28 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/model/CudaBilateralLagrangianConstraint.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/lagrangian/model/CudaBilateralLagrangianConstraint.cpp @@ -40,14 +40,17 @@ template class SOFA_GPU_CUDA_API BilateralLagrangianConstraint >() - .add< BilateralLagrangianConstraint >() + void registerBilateralLagrangianConstraint(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BilateralLagrangianConstraint") + .add< BilateralLagrangianConstraint >() + .add< BilateralLagrangianConstraint >() #ifdef SOFA_GPU_CUDA_DOUBLE - .add< BilateralLagrangianConstraint >() - .add< BilateralLagrangianConstraint >() + .add< BilateralLagrangianConstraint >() + .add< BilateralLagrangianConstraint >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } + } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedProjectiveConstraint.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedProjectiveConstraint.cpp index 0384749ab2c..bfb8b33975a 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedProjectiveConstraint.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedProjectiveConstraint.cpp @@ -47,7 +47,9 @@ template class SOFA_GPU_CUDA_API FixedProjectiveConstraintregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the FixedProjectiveConstraint") .add< component::constraint::projective::FixedProjectiveConstraint >() .add< component::constraint::projective::FixedProjectiveConstraint >() .add< component::constraint::projective::FixedProjectiveConstraint >() @@ -59,6 +61,6 @@ int FixedProjectiveConstraintCudaClass = core::RegisterObject("Supports GPU-side .add< component::constraint::projective::FixedProjectiveConstraint >() .add< component::constraint::projective::FixedProjectiveConstraint >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedTranslationProjectiveConstraint.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedTranslationProjectiveConstraint.cpp index 57342d81838..16ad9a84ba7 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedTranslationProjectiveConstraint.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaFixedTranslationProjectiveConstraint.cpp @@ -112,19 +112,15 @@ template class SOFA_GPU_CUDA_API FixedTranslationProjectiveConstraint >() -// .add< component::constraint::projective::FixedTranslationProjectiveConstraint >() + void registerFixedTranslationProjectiveConstraint(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the FixedTranslationProjectiveConstraint") .add< component::constraint::projective::FixedTranslationProjectiveConstraint >() .add< component::constraint::projective::FixedTranslationProjectiveConstraint >() #ifdef SOFA_GPU_CUDA_DOUBLE -// .add< component::constraint::projective::FixedTranslationProjectiveConstraint >() -// .add< component::constraint::projective::FixedTranslationProjectiveConstraint >() .add< component::constraint::projective::FixedTranslationProjectiveConstraint >() .add< component::constraint::projective::FixedTranslationProjectiveConstraint >() #endif // SOFA_GPU_CUDA_DOUBLE - ; - + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearMovementProjectiveConstraint.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearMovementProjectiveConstraint.cpp index 2ef5054b202..2736b2ccd68 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearMovementProjectiveConstraint.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearMovementProjectiveConstraint.cpp @@ -40,18 +40,15 @@ namespace sofa::core::behavior namespace sofa::gpu::cuda { - -int LinearMovementProjectiveConstraintCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") -// .add< component::constraint::projective::LinearMovementProjectiveConstraint >() -// .add< component::constraint::projective::LinearMovementProjectiveConstraint >() + void registerLinearMovementProjectiveConstraint(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the LinearMovementProjectiveConstraint") .add< component::constraint::projective::LinearMovementProjectiveConstraint >() .add< component::constraint::projective::LinearMovementProjectiveConstraint >() #ifdef SOFA_GPU_CUDA_DOUBLE -// .add< component::constraint::projective::LinearMovementProjectiveConstraint >() -// .add< component::constraint::projective::LinearMovementProjectiveConstraint >() .add< component::constraint::projective::LinearMovementProjectiveConstraint >() .add< component::constraint::projective::LinearMovementProjectiveConstraint >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearVelocityProjectiveConstraint.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearVelocityProjectiveConstraint.cpp index c720af9db74..1641852bf1c 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearVelocityProjectiveConstraint.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/constraint/projective/CudaLinearVelocityProjectiveConstraint.cpp @@ -40,13 +40,15 @@ template class SOFA_GPU_CUDA_API LinearVelocityProjectiveConstraintregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the LinearVelocityProjectiveConstraint") .add< sofa::component::constraint::projective::LinearVelocityProjectiveConstraint >() .add< sofa::component::constraint::projective::LinearVelocityProjectiveConstraint >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::constraint::projective::LinearVelocityProjectiveConstraint >() .add< sofa::component::constraint::projective::LinearVelocityProjectiveConstraint >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaBoxROI.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaBoxROI.cpp index 67fb4d40023..5b2ad8e6eee 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaBoxROI.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaBoxROI.cpp @@ -41,7 +41,9 @@ template class SOFA_GPU_CUDA_API boxroi::BoxROI; namespace sofa::gpu::cuda { -int BoxROICudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerBoxROI(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BoxROI") .add< component::engine::select::boxroi::BoxROI >() .add< component::engine::select::boxroi::BoxROI >() .add< component::engine::select::boxroi::BoxROI >() @@ -52,7 +54,7 @@ int BoxROICudaClass = core::RegisterObject("Supports GPU-side computations using .add< component::engine::select::boxroi::BoxROI >() .add< component::engine::select::boxroi::BoxROI >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaNearestPointROI.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaNearestPointROI.cpp index 17114f4ea72..a4869bbbd54 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaNearestPointROI.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaNearestPointROI.cpp @@ -38,13 +38,15 @@ template class SOFA_GPU_CUDA_API NearestPointROI; namespace sofa::gpu::cuda { -int NearestPointROICudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerNearestPointROI(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the NearestPointROI") .add< component::engine::select::NearestPointROI >() .add< component::engine::select::NearestPointROI >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::engine::select::NearestPointROI >() .add< component::engine::select::NearestPointROI >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaSphereROI.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaSphereROI.cpp index 574dff56ee9..b5bb5671914 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaSphereROI.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/select/CudaSphereROI.cpp @@ -40,13 +40,15 @@ template class SOFA_GPU_CUDA_API SphereROI; namespace sofa::gpu::cuda { -int SphereROICudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerSphereROI(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the SphereROI") .add< component::engine::select::SphereROI >() .add< component::engine::select::SphereROI >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::engine::select::SphereROI >() .add< component::engine::select::SphereROI >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/transform/CudaIndexValueMapper.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/transform/CudaIndexValueMapper.cpp index 64f1fb259a6..a6fc951b707 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/transform/CudaIndexValueMapper.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/engine/transform/CudaIndexValueMapper.cpp @@ -39,14 +39,15 @@ template class SOFA_GPU_CUDA_API IndexValueMapper; namespace sofa::gpu::cuda { - -int IndexValueMapperClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerIndexValueMapper(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the IndexValueMapper") .add >() .add >() #ifdef SOFA_GPU_CUDA_DOUBLE .add >() .add >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f.cpp index 4ec1b36e0ad..d5d97ee74c4 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f.cpp @@ -266,8 +266,10 @@ using namespace sofa::core; using namespace sofa::core::behavior; using namespace sofa::component::mapping::linear; -int BarycentricMappingCudaClass_3f = core::RegisterObject("Supports GPU-side computations using CUDA") - .add< BarycentricMapping< CudaVec3fTypes, CudaVec3fTypes> >() - ; +void registerBarycentricMapping_3f(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BarycentricMapping_3f") + .add< BarycentricMapping< CudaVec3fTypes, CudaVec3fTypes> >() +} } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-3f.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-3f.cpp index 3622e7a752d..bd155cc3a28 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-3f.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-3f.cpp @@ -427,9 +427,11 @@ using namespace sofa::core; using namespace sofa::core::behavior; using namespace sofa::component::mapping::linear; -int BarycentricMappingCudaClass_3f1_3f = core::RegisterObject("Supports GPU-side computations using CUDA") - .add< BarycentricMapping< CudaVec3f1Types, CudaVec3fTypes> >() - .add< BarycentricMapping< CudaVec3fTypes, CudaVec3f1Types> >() - ; +void registerBarycentricMapping_3f1_3f(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BarycentricMapping_3f1_3f") + .add< BarycentricMapping< CudaVec3f1Types, CudaVec3fTypes> >() + .add< BarycentricMapping< CudaVec3fTypes, CudaVec3f1Types> >() +} } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-d.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-d.cpp index 4ff9260c226..2d60517231c 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-d.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-d.cpp @@ -52,10 +52,11 @@ using namespace sofa::core; using namespace sofa::core::behavior; using namespace sofa::component::mapping::linear; -int BarycentricMappingCudaClass_3f1_d = core::RegisterObject("Supports GPU-side computations using CUDA") - .add< BarycentricMapping< Vec3Types, CudaVec3f1Types> >() - .add< BarycentricMapping< CudaVec3f1Types, Vec3Types> >() - - ; +void registerBarycentricMapping_3f1_d(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the registerBarycentricMapping_3f1_d") + .add< BarycentricMapping< Vec3Types, CudaVec3f1Types> >() + .add< BarycentricMapping< CudaVec3f1Types, Vec3Types> >() +} } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp index 61862e6bdad..29a3042c214 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp @@ -47,13 +47,15 @@ using namespace sofa::gpu::cuda; namespace gpu::cuda { -using namespace sofa::defaulttype; -using namespace sofa::core; -using namespace sofa::core::behavior; -using namespace sofa::component::mapping::linear; - -int BarycentricMappingCudaClass_3f1_f = core::RegisterObject("Supports GPU-side computations using CUDA") - ; + using namespace sofa::defaulttype; + using namespace sofa::core; + using namespace sofa::core::behavior; + using namespace sofa::component::mapping::linear; + + void registerBarycentricMapping_3f1_f(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BarycentricMapping_3f1_f") + } } // namespace gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1.cpp index c411530e6d4..3d20c24e0ca 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1.cpp @@ -242,8 +242,10 @@ using namespace sofa::core; using namespace sofa::core::behavior; using namespace sofa::component::mapping::linear; -int BarycentricMappingCudaClass_3f1 = core::RegisterObject("Supports GPU-side computations using CUDA") - .add< BarycentricMapping< CudaVec3f1Types, CudaVec3f1Types> >() - ; +void registerBarycentricMapping_3f1(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BarycentricMapping_3f1") + .add< BarycentricMapping< CudaVec3f1Types, CudaVec3f1Types> >() +} } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp index 62f78160fa3..f128e977c06 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp @@ -52,8 +52,10 @@ using namespace sofa::core; using namespace sofa::core::behavior; using namespace sofa::component::mapping::linear; -int BarycentricMappingCudaClass_f = core::RegisterObject("Supports GPU-side computations using CUDA") - ; +void registerBarycentricMapping_f(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BarycentricMapping_f") +} } // namespace gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping.cpp index 39d994729b7..6d136613571 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping.cpp @@ -44,15 +44,16 @@ template class SOFA_GPU_CUDA_API BarycentricMapping< CudaVec3Types, Vec3Types>; namespace sofa::gpu::cuda { -using namespace sofa::defaulttype; -using namespace sofa::core; -using namespace sofa::core::behavior; -using namespace sofa::component::mapping::linear; - -int BarycentricMappingCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + using namespace sofa::defaulttype; + using namespace sofa::core; + using namespace sofa::core::behavior; + using namespace sofa::component::mapping::linear; + + void registerBarycentricMapping(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BarycentricMapping") .add< BarycentricMapping< Vec3Types, CudaVec3Types> >() .add< BarycentricMapping< CudaVec3Types, Vec3Types> >() - - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMappingRigid.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMappingRigid.cpp index 2dda9260a51..26333140f3f 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMappingRigid.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMappingRigid.cpp @@ -49,10 +49,11 @@ using namespace sofa::defaulttype; using namespace sofa::gpu::cuda; // Register in the Factory -int BarycentricMappingRigidClass = core::RegisterObject("") - .add< BarycentricMapping< CudaVec3Types, Rigid3Types > >() - - ; +void registerBarycentricMapping(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the BarycentricMapping") + .add< BarycentricMapping< CudaVec3Types, Rigid3Types > >() +} template <> diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBeamLinearMapping.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBeamLinearMapping.cpp index d6a8813fac2..0696f0dac17 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBeamLinearMapping.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBeamLinearMapping.cpp @@ -30,21 +30,20 @@ namespace sofa::gpu::cuda { -using namespace sofa::component::mapping::linear; -using namespace defaulttype; -using namespace core; -using namespace core::behavior; - - -// Register in the Factory -int BeamLinearMappingCudaClass = core::RegisterObject("Set the positions and velocities of points attached to a beam using linear interpolation between DOFs") + using namespace sofa::component::mapping::linear; + using namespace defaulttype; + using namespace core; + using namespace core::behavior; + // Register in the Factory + void registerBeamLinearMapping(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Set the positions and velocities of points attached to a beam using linear interpolation between DOFs") .add< BeamLinearMapping >() - #ifdef SOFA_GPU_CUDA_DOUBLE .add< BeamLinearMapping >() #endif - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaIdentityMapping.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaIdentityMapping.cpp index 4d5f456547b..bc455d956f8 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaIdentityMapping.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaIdentityMapping.cpp @@ -61,32 +61,32 @@ template class SOFA_GPU_CUDA_API IdentityMapping< Vec3Types, CudaVec3dTypes>; namespace sofa::gpu::cuda { -using namespace sofa::defaulttype; -using namespace sofa::component::mapping::linear; - -int IdentityMappingCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") - // CudaVec3fTypes - .add< IdentityMapping< CudaVec3fTypes, CudaVec3fTypes> >() - .add< IdentityMapping< CudaVec3fTypes, CudaVec3f1Types> >() - .add< IdentityMapping< CudaVec3fTypes, Vec3Types> >() - .add< IdentityMapping< Vec3Types, CudaVec3fTypes> >() - - // CudaVec3f1Types - .add< IdentityMapping< CudaVec3f1Types, CudaVec3f1Types> >() - .add< IdentityMapping< CudaVec3f1Types, CudaVec3fTypes> >() - .add< IdentityMapping< CudaVec3f1Types, Vec3Types> >() - .add< IdentityMapping< Vec3Types, CudaVec3f1Types> >() - + using namespace sofa::defaulttype; + using namespace sofa::component::mapping::linear; + + void registerIdentityMapping(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the IdentityMapping") + // CudaVec3fTypes + .add< IdentityMapping< CudaVec3fTypes, CudaVec3fTypes> >() + .add< IdentityMapping< CudaVec3fTypes, CudaVec3f1Types> >() + .add< IdentityMapping< CudaVec3fTypes, Vec3Types> >() + .add< IdentityMapping< Vec3Types, CudaVec3fTypes> >() + + // CudaVec3f1Types + .add< IdentityMapping< CudaVec3f1Types, CudaVec3f1Types> >() + .add< IdentityMapping< CudaVec3f1Types, CudaVec3fTypes> >() + .add< IdentityMapping< CudaVec3f1Types, Vec3Types> >() + .add< IdentityMapping< Vec3Types, CudaVec3f1Types> >() + #ifdef SOFA_GPU_CUDA_DOUBLE - // CudaVec3dTypes - .add< IdentityMapping< CudaVec3dTypes, CudaVec3dTypes> >() - .add< IdentityMapping< CudaVec3dTypes, CudaVec3fTypes> >() - .add< IdentityMapping< CudaVec3dTypes, Vec3Types> >() - - .add< IdentityMapping< CudaVec3fTypes, CudaVec3dTypes> >() - .add< IdentityMapping< Vec3Types, CudaVec3dTypes> >() - + // CudaVec3dTypes + .add< IdentityMapping< CudaVec3dTypes, CudaVec3dTypes> >() + .add< IdentityMapping< CudaVec3dTypes, CudaVec3fTypes> >() + .add< IdentityMapping< CudaVec3dTypes, Vec3Types> >() + .add< IdentityMapping< CudaVec3fTypes, CudaVec3dTypes> >() + .add< IdentityMapping< Vec3Types, CudaVec3dTypes> >() #endif - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMapping.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMapping.cpp index b2392c1af83..e5ee4cf39a0 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMapping.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMapping.cpp @@ -41,12 +41,14 @@ namespace sofa::gpu::cuda { using namespace sofa::component::mapping::linear; -int SubsetMappingCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerSubsetMapping(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the SubsetMapping") .add< SubsetMapping< CudaVec3fTypes, CudaVec3fTypes > >() .add< SubsetMapping< CudaVec3f1Types, CudaVec3f1Types > >() .add< SubsetMapping< CudaVec3f1Types, CudaVec3fTypes > >() .add< SubsetMapping< CudaVec3fTypes, CudaVec3f1Types > >() - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMultiMapping.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMultiMapping.cpp index 845d3d12357..fdbbccf2e5e 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMultiMapping.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaSubsetMultiMapping.cpp @@ -30,7 +30,9 @@ namespace sofa::gpu::cuda using namespace sofa::component::mapping::linear; // Register in the Factory - int SubsetMultiMappingCudaClass = core::RegisterObject("Compute a subset of the input MechanicalObjects according to a dof index list") + void registerSubsetMultiMapping(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Compute a subset of the input MechanicalObjects according to a dof index list") .add< SubsetMultiMapping< CudaVec3Types, CudaVec3Types > >() .add< SubsetMultiMapping< CudaVec1Types, CudaVec1Types > >() .add< SubsetMultiMapping< CudaRigid3Types, CudaRigid3Types > >() @@ -42,7 +44,7 @@ namespace sofa::gpu::cuda .add< SubsetMultiMapping< CudaRigid3dTypes, CudaRigid3dTypes > >() .add< SubsetMultiMapping< CudaRigid3dTypes, CudaVec3dTypes > >() #endif - ; + } } namespace sofa::component::mapping::linear diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/nonlinear/CudaRigidMapping.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/nonlinear/CudaRigidMapping.cpp index 7141dec7131..86b3222dddb 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/nonlinear/CudaRigidMapping.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/nonlinear/CudaRigidMapping.cpp @@ -65,14 +65,13 @@ using namespace sofa::core; using namespace sofa::core::behavior; using namespace sofa::component::mapping::nonlinear; -int RigidMappingCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") +void registerRigidMapping(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the RigidMapping") .add< RigidMapping< CudaRigid3fTypes, CudaVec3fTypes> >() .add< RigidMapping< Rigid3fTypes, CudaVec3fTypes> >() .add< RigidMapping< Rigid3Types, CudaVec3Types> >() .add< RigidMapping< Rigid3Types, CudaVec3f1Types> >() - -//.add< RigidMapping< CudaRigid3fTypes, Vec3dTypes> >() -//.add< RigidMapping< CudaRigid3fTypes, Vec3fTypes> >() .add< RigidMapping< CudaRigid3fTypes, CudaVec3f1Types> >() .add< RigidMapping< Rigid3fTypes, CudaVec3f1Types> >() @@ -80,12 +79,10 @@ int RigidMappingCudaClass = core::RegisterObject("Supports GPU-side computations .add< RigidMapping< CudaRigid3fTypes, CudaVec3dTypes> >() .add< RigidMapping< Rigid3fTypes, CudaVec3dTypes> >() .add< RigidMapping< Rigid3dTypes, CudaVec3dTypes> >() -//.add< RigidMapping< CudaRigid3fTypes, Vec3dTypes> >() -//.add< RigidMapping< CudaRigid3fTypes, Vec3fTypes> >() .add< RigidMapping< CudaRigid3fTypes, CudaVec3d1Types> >() .add< RigidMapping< Rigid3fTypes, CudaVec3d1Types> >() .add< RigidMapping< Rigid3dTypes, CudaVec3d1Types> >() #endif // SOFA_GPU_CUDA_DOUBLE - ; +} } //namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp index 896035e5498..94debbdff2b 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp @@ -52,17 +52,15 @@ template class SOFA_GPU_CUDA_API DiagonalMass; namespace gpu::cuda { - -// Register in the Factory -int DiagonalMassCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") - .add< component::mass::DiagonalMass >() - + // Register in the Factory + void registerDiagonalMass(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the DiagonalMass") + .add< component::mass::DiagonalMass >() #ifdef SOFA_GPU_CUDA_DOUBLE - .add< component::mass::DiagonalMass >() - // SOFA_GPU_CUDA_DOUBLE -#endif - ; - + .add< component::mass::DiagonalMass >() + #endif // SOFA_GPU_CUDA_DOUBLE + } } // namespace gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp index 55706d82cd7..0c9a2b9fff9 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp @@ -67,7 +67,9 @@ template class SOFA_GPU_CUDA_API MeshMatrixMassregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the MeshMatrixMass") .add< component::mass::MeshMatrixMass >(true) .add< component::mass::MeshMatrixMass >() .add< component::mass::MeshMatrixMass >() @@ -82,7 +84,7 @@ int MeshMatrixMassClassCudaClass = core::RegisterObject("Supports GPU-side compu .add< component::mass::MeshMatrixMass >() .add< component::mass::MeshMatrixMass >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp index 296a02227e0..09c5ba3155f 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp @@ -29,7 +29,9 @@ namespace sofa::gpu::cuda { -int UniformMassCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerUniformMass(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the UniformMass") .add< component::mass::UniformMass >() .add< component::mass::UniformMass >() .add< component::mass::UniformMass >() @@ -38,7 +40,7 @@ int UniformMassCudaClass = core::RegisterObject("Supports GPU-side computations .add< component::mass::UniformMass >() .add< component::mass::UniformMass >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaConstantForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaConstantForceField.cpp index da04a5de3ab..5158e57f569 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaConstantForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaConstantForceField.cpp @@ -31,7 +31,9 @@ namespace sofa::gpu::cuda using namespace sofa::component::mechanicalload; // Register in the Factory - int ConstantForceFieldCudaClass = core::RegisterObject("Constant forces applied to given degrees of freedom") + void registerConstantForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Constant forces applied to given degrees of freedom") .add< ConstantForceField >() .add< ConstantForceField >() .add< ConstantForceField >() @@ -47,7 +49,8 @@ namespace sofa::gpu::cuda .add< ConstantForceField >() .add< ConstantForceField >() #endif - ; + } + } // namespace sofa::gpu::cuda namespace sofa::component::mechanicalload diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaEllipsoidForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaEllipsoidForceField.cpp index 579f8eb3e4c..3c97c91ff6c 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaEllipsoidForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaEllipsoidForceField.cpp @@ -28,9 +28,11 @@ namespace sofa::gpu::cuda { -int EllipsoidForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerEllipsoidForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the EllipsoidForceField") .add< component::mechanicalload::EllipsoidForceField >() .add< component::mechanicalload::EllipsoidForceField >() - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaLinearForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaLinearForceField.cpp index 80bdb3e4286..927c7abc731 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaLinearForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaLinearForceField.cpp @@ -41,7 +41,9 @@ template class SOFA_GPU_CUDA_API LinearForceField; namespace sofa::gpu::cuda { -int LinearForceFieldCudaClass = core::RegisterObject("Supports GPU-side computation using CUDA") + void registerLinearForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the LinearForceField") .add< component::mechanicalload::LinearForceField >() .add< component::mechanicalload::LinearForceField >() .add< component::mechanicalload::LinearForceField >() @@ -49,6 +51,6 @@ int LinearForceFieldCudaClass = core::RegisterObject("Supports GPU-side computat .add< component::mechanicalload::LinearForceField >() .add< component::mechanicalload::LinearForceField >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } }// namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaPlaneForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaPlaneForceField.cpp index 33eeca7bbea..c188195ded7 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaPlaneForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaPlaneForceField.cpp @@ -27,13 +27,15 @@ namespace sofa::gpu::cuda { -int PlaneForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerPlaneForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the PlaneForceField") .add< component::mechanicalload::PlaneForceField >() .add< component::mechanicalload::PlaneForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::mechanicalload::PlaneForceField >() .add< component::mechanicalload::PlaneForceField >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaSphereForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaSphereForceField.cpp index f5ecbe7a3bc..a7b9cef2442 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaSphereForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mechanicalload/CudaSphereForceField.cpp @@ -38,13 +38,15 @@ template class SOFA_GPU_CUDA_API SphereForceField< CudaVec3d1Types >; namespace sofa::gpu::cuda { -int SphereForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerSphereForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the SphereForceField") .add< component::mechanicalload::SphereForceField >() .add< component::mechanicalload::SphereForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::mechanicalload::SphereForceField >() .add< component::mechanicalload::SphereForceField >() #endif - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaHexahedronFEMForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaHexahedronFEMForceField.cpp index edc80f0428d..54b72537476 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaHexahedronFEMForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaHexahedronFEMForceField.cpp @@ -38,13 +38,15 @@ template class SOFA_GPU_CUDA_API HexahedronFEMForceField >() -.add< sofa::component::solidmechanics::fem::elastic::HexahedronFEMForceField >() + void registerHexahedronFEMForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the HexahedronFEMForceField") + .add< sofa::component::solidmechanics::fem::elastic::HexahedronFEMForceField >() + .add< sofa::component::solidmechanics::fem::elastic::HexahedronFEMForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE -.add< component::solidmechanics::fem::elastic::HexahedronFEMForceField >() -.add< component::solidmechanics::fem::elastic::HexahedronFEMForceField >() + .add< component::solidmechanics::fem::elastic::HexahedronFEMForceField >() + .add< component::solidmechanics::fem::elastic::HexahedronFEMForceField >() #endif // SOFA_GPU_CUDA_DOUBLE -; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTetrahedronFEMForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTetrahedronFEMForceField.cpp index 6deb334c78f..5b2437aa3e5 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTetrahedronFEMForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTetrahedronFEMForceField.cpp @@ -39,13 +39,15 @@ template class SOFA_GPU_CUDA_API TetrahedronFEMForceField; namespace sofa::gpu::cuda { -int TetrahedronFEMForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") + void registerTetrahedronFEMForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TetrahedronFEMForceField") .add< sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField >() .add< sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField >() .add< sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTriangularFEMForceFieldOptim.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTriangularFEMForceFieldOptim.cpp index 64e48390864..dd7d533b46d 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTriangularFEMForceFieldOptim.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaTriangularFEMForceFieldOptim.cpp @@ -37,11 +37,13 @@ template class SOFA_GPU_CUDA_API TriangularFEMForceFieldOptim >() + void registerTriangularFEMForceFieldOptim(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TriangularFEMForceFieldOptim") + .add< sofa::component::solidmechanics::fem::elastic::TriangularFEMForceFieldOptim >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::solidmechanics::fem::elastic::TriangularFEMForceFieldOptim >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp index 2345994a12c..71af7a48a84 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp @@ -31,14 +31,15 @@ namespace sofa namespace gpu::cuda { - -int StandardTetrahedralFEMForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") -.add< sofa::component::solidmechanics::fem::hyperelastic::StandardTetrahedralFEMForceField >() + + void registerStandardTetrahedralFEMForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the StandardTetrahedralFEMForceField") + .add< sofa::component::solidmechanics::fem::hyperelastic::StandardTetrahedralFEMForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE -.add< sofa::component::solidmechanics::fem::hyperelastic::StandardTetrahedralFEMForceField >() + .add< sofa::component::solidmechanics::fem::hyperelastic::StandardTetrahedralFEMForceField >() #endif -; - + } } // namespace gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaRestShapeSpringsForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaRestShapeSpringsForceField.cpp index d3ae0f11260..42f489a0f59 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaRestShapeSpringsForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaRestShapeSpringsForceField.cpp @@ -41,13 +41,15 @@ template class SOFA_GPU_CUDA_API RestShapeSpringsForceFieldregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the RestShapeSpringsForceField") .add< sofa::component::solidmechanics::spring::RestShapeSpringsForceField >() .add< sofa::component::solidmechanics::spring::RestShapeSpringsForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::solidmechanics::spring::RestShapeSpringsForceField >() .add< sofa::component::solidmechanics::spring::RestShapeSpringsForceField >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaSpringForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaSpringForceField.cpp index f061794cde6..518df713bcc 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaSpringForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/spring/CudaSpringForceField.cpp @@ -62,40 +62,48 @@ template class SOFA_GPU_CUDA_API MeshSpringForceFieldregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the SpringForceField") .add< sofa::component::solidmechanics::spring::SpringForceField >() .add< sofa::component::solidmechanics::spring::SpringForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::solidmechanics::spring::SpringForceField >() .add< sofa::component::solidmechanics::spring::SpringForceField >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } -int MeshSpringForceFieldCudaClass = sofa::core::RegisterObject("Supports GPU-side computations using CUDA") + void registerMeshSpringForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the MeshSpringForceField") .add< sofa::component::solidmechanics::spring::MeshSpringForceField >() .add< sofa::component::solidmechanics::spring::MeshSpringForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::solidmechanics::spring::MeshSpringForceField >() .add< sofa::component::solidmechanics::spring::MeshSpringForceField >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } -int TriangleBendingSpringsCudaClass = sofa::core::RegisterObject("Supports GPU-side computations using CUDA") + void registerTriangleBendingSprings(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TriangleBendingSprings") .add< sofa::component::solidmechanics::spring::TriangleBendingSprings >() .add< sofa::component::solidmechanics::spring::TriangleBendingSprings >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::solidmechanics::spring::TriangleBendingSprings >() .add< sofa::component::solidmechanics::spring::TriangleBendingSprings >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } -int QuadBendingSpringsCudaClass = sofa::core::RegisterObject("Supports GPU-side computations using CUDA") + void registerQuadBendingSprings(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the QuadBendingSprings") .add< sofa::component::solidmechanics::spring::QuadBendingSprings >() .add< sofa::component::solidmechanics::spring::QuadBendingSprings >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< sofa::component::solidmechanics::spring::QuadBendingSprings >() .add< sofa::component::solidmechanics::spring::QuadBendingSprings >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp index e6af7b2e940..a78eb0fc5a9 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp @@ -30,13 +30,15 @@ namespace sofa namespace gpu::cuda { -int TetrahedralTensorMassForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") -.add< sofa::component::solidmechanics::tensormass::TetrahedralTensorMassForceField >() + + void registerTetrahedralTensorMassForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TetrahedralTensorMassForceField") + .add< sofa::component::solidmechanics::tensormass::TetrahedralTensorMassForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE -.add< sofa::component::solidmechanics::tensormass::TetrahedralTensorMassForceField >() + .add< sofa::component::solidmechanics::tensormass::TetrahedralTensorMassForceField >() #endif -; - + } } // namespace gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/statecontainer/CudaMechanicalObject.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/statecontainer/CudaMechanicalObject.cpp index 48530cf5670..1fd974f56a9 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/statecontainer/CudaMechanicalObject.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/statecontainer/CudaMechanicalObject.cpp @@ -73,42 +73,46 @@ template class SOFA_GPU_CUDA_API MechanicalObject; namespace sofa::gpu::cuda { -int MechanicalObjectCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() +void registerMechanicalObject(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the MechanicalObject") + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() #ifdef SOFA_GPU_CUDA_DOUBLE - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() - .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() + .add< component::statecontainer::MechanicalObject >() #endif // SOFA_GPU_CUDA_DOUBLE - ; +} -int MappedObjectCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() +void registerMappedObject(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("GPU-based collision detection using CUDA for the MappedObject") + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() #ifdef SOFA_GPU_CUDA_DOUBLE - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() - .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() + .add< component::statecontainer::MappedObject >() #endif // SOFA_GPU_CUDA_DOUBLE - ; +} } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaCollision.cpp b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaCollision.cpp index 8558ccf8612..7fafededdff 100644 --- a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaCollision.cpp +++ b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaCollision.cpp @@ -79,10 +79,11 @@ class CudaProximityIntersection : public NewProximityIntersection }; - -int CudaProximityIntersectionClass = core::RegisterObject("GPGPU Proximity Intersection based on CUDA") - .add< CudaProximityIntersection >() - ; +void registerProximityIntersection(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("GPGPU Proximity Intersection based on CUDA") + .add< CudaProximityIntersection >() +} sofa::helper::Creator> > RayCudaSphereContactClass("RayContact",true); diff --git a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaExtraMonitor.cpp b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaExtraMonitor.cpp index 7b133bcec25..e6fc9160a06 100644 --- a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaExtraMonitor.cpp +++ b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaExtraMonitor.cpp @@ -43,13 +43,15 @@ template class SOFA_GPU_CUDA_API ExtraMonitor; namespace sofa::gpu::cuda { -int ExtraMonitorCudaClass = core::RegisterObject("Supports GPU-side computation using CUDA") + void registerExtraMonitor(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the ExtraMonitor") .add< component::misc::ExtraMonitor >() .add< component::misc::ExtraMonitor >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::misc::ExtraMonitor >() .add< component::misc::ExtraMonitor >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } }// namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp index c7e2f8763e1..1c0b28bd136 100644 --- a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp +++ b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp @@ -32,9 +32,11 @@ using namespace std; namespace sofa::gpu::cuda { -int CudaHexahedronTLEDForceFieldCudaClass = core::RegisterObject("GPU-side TLED hexahedron forcefield using CUDA") - .add< CudaHexahedronTLEDForceField >() - ; +void registerHexahedronTLEDForceField(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("GPU-side TLED hexahedron forcefield using CUDA") + .add< CudaHexahedronTLEDForceField >() +} extern "C" { diff --git a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaSetTopology.cpp b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaSetTopology.cpp index 203ac9bcd41..05c07fbbb48 100644 --- a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaSetTopology.cpp +++ b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaSetTopology.cpp @@ -73,13 +73,15 @@ inline real tripleProduct(const Vec3r1& a, const Vec3r1& b,const Vec //////// Point //////// //////////////////////////////// -int CudaPointSetGeometryAlgorithmsClass = core::RegisterObject("") +void registerPointSetGeometryAlgorithms(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the PointSetGeometryAlgorithms") #ifdef SOFA_GPU_CUDA_DOUBLE .add< PointSetGeometryAlgorithms >() #endif // SOFA_GPU_CUDA_DOUBLE .add< PointSetGeometryAlgorithms >() .add< PointSetGeometryAlgorithms >() - ; +} #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFA_GPU_CUDA_API PointSetGeometryAlgorithms; @@ -92,13 +94,15 @@ template class SOFA_GPU_CUDA_API PointSetGeometryAlgorithms; //////// Edge //////// //////////////////////////////// -int CudaEdgeSetGeometryAlgorithmsClass = core::RegisterObject("") +void registerEdgeSetGeometryAlgorithms(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the EdgeSetGeometryAlgorithms") #ifdef SOFA_GPU_CUDA_DOUBLE - .add< EdgeSetGeometryAlgorithms >() + .add< EdgeSetGeometryAlgorithms >() #endif // SOFA_GPU_CUDA_DOUBLE - .add< EdgeSetGeometryAlgorithms >() - .add< EdgeSetGeometryAlgorithms >() - ; + .add< EdgeSetGeometryAlgorithms >() + .add< EdgeSetGeometryAlgorithms >() +} #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFA_GPU_CUDA_API EdgeSetGeometryAlgorithms; @@ -111,13 +115,15 @@ template class SOFA_GPU_CUDA_API EdgeSetGeometryAlgorithms; //////// Triangle //////// //////////////////////////////// -int CudaTriangleSetGeometryAlgorithmsClass = core::RegisterObject("") +void registerTriangleSetGeometryAlgorithms(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TriangleSetGeometryAlgorithms") #ifdef SOFA_GPU_CUDA_DOUBLE .add< TriangleSetGeometryAlgorithms >() #endif // SOFA_GPU_CUDA_DOUBLE .add< TriangleSetGeometryAlgorithms >() .add< TriangleSetGeometryAlgorithms >() - ; +} #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFA_GPU_CUDA_API TriangleSetGeometryAlgorithms; @@ -130,13 +136,15 @@ template class SOFA_GPU_CUDA_API TriangleSetGeometryAlgorithms; //////// Quad //////// //////////////////////////////// -int CudaQuadSetGeometryAlgorithmsClass = core::RegisterObject("") +void registerQuadSetGeometryAlgorithms(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the QuadSetGeometryAlgorithms") #ifdef SOFA_GPU_CUDA_DOUBLE .add< QuadSetGeometryAlgorithms >() #endif // SOFA_GPU_CUDA_DOUBLE .add< QuadSetGeometryAlgorithms >() .add< QuadSetGeometryAlgorithms >() - ; +} #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFA_GPU_CUDA_API QuadSetGeometryAlgorithms; @@ -149,13 +157,15 @@ template class SOFA_GPU_CUDA_API QuadSetGeometryAlgorithms; //////// Tetrahedron //////// //////////////////////////////// -int CudaTetrahedronSetGeometryAlgorithmsClass = core::RegisterObject("") +void registerTetrahedronSetGeometryAlgorithms(sofa::core::ObjectFactory* factory) +{ + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TetrahedronSetGeometryAlgorithms") #ifdef SOFA_GPU_CUDA_DOUBLE .add< TetrahedronSetGeometryAlgorithms >() #endif // SOFA_GPU_CUDA_DOUBLE .add< TetrahedronSetGeometryAlgorithms >() .add< TetrahedronSetGeometryAlgorithms >() - ; +} #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFA_GPU_CUDA_API TetrahedronSetGeometryAlgorithms; @@ -168,13 +178,15 @@ template class SOFA_GPU_CUDA_API TetrahedronSetGeometryAlgorithmsregisterObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the HexahedronSetGeometryAlgorithms") #ifdef SOFA_GPU_CUDA_DOUBLE .add< HexahedronSetGeometryAlgorithms >() #endif // SOFA_GPU_CUDA_DOUBLE .add< HexahedronSetGeometryAlgorithms >() .add< HexahedronSetGeometryAlgorithms >() - ; +} #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFA_GPU_CUDA_API HexahedronSetGeometryAlgorithms; diff --git a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.cpp b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.cpp index ea7c34b88e4..fab6b93d30e 100644 --- a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.cpp +++ b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.cpp @@ -33,9 +33,11 @@ namespace sofa::gpu::cuda { -int CudaTetrahedronTLEDForceFieldCudaClass = core::RegisterObject("GPU TLED tetrahedron forcefield using CUDA") + void registerTetrahedronTLEDForceField(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the TetrahedronTLEDForceField") .add< CudaTetrahedronTLEDForceField >() - ; + } extern "C" { diff --git a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaVisualModel.cpp b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaVisualModel.cpp index 61b7193f9c9..07f59bd8091 100644 --- a/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaVisualModel.cpp +++ b/applications/plugins/SofaCUDA/src/sofa/gpu/cuda/CudaVisualModel.cpp @@ -27,14 +27,16 @@ namespace sofa::gpu::cuda { -int CudaVisualModelClass = core::RegisterObject("Rendering of meshes based on CUDA") + void registerVisualModel(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Rendering of meshes based on CUDA") .add< component::visualmodel::CudaVisualModel >() .add< component::visualmodel::CudaVisualModel >() #ifdef SOFA_GPU_CUDA_DOUBLE .add< component::visualmodel::CudaVisualModel >() .add< component::visualmodel::CudaVisualModel >() #endif // SOFA_GPU_CUDA_DOUBLE - ; + } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/src/sofa/gpu/gui/CudaMouseInteraction.cpp b/applications/plugins/SofaCUDA/src/sofa/gpu/gui/CudaMouseInteraction.cpp index e016ad089f3..8985b6c6255 100644 --- a/applications/plugins/SofaCUDA/src/sofa/gpu/gui/CudaMouseInteraction.cpp +++ b/applications/plugins/SofaCUDA/src/sofa/gpu/gui/CudaMouseInteraction.cpp @@ -67,13 +67,15 @@ int triangleFixParticle = FixParticlePerformerCuda3d::RegisterSupportedModel >() + void registerMouseInteractor(sofa::core::ObjectFactory* factory) + { + factory->registerObjects(sofa::core::ObjectRegistrationData("Supports GPU-side computations using CUDA for the MouseInteractor") + .add< MouseInteractor >() #ifdef SOFA_GPU_CUDA_DOUBLE - .add< MouseInteractor >() + .add< MouseInteractor >() #endif - ; + } }