Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SofaBaseLinearSolver] Cleaning in FullMatrix & FullVector & MechanicalState #1792

Merged
merged 37 commits into from Feb 25, 2021

Conversation

damienmarchal
Copy link
Contributor

@damienmarchal damienmarchal commented Feb 8, 2021

Explicit instanciation of FullMatrix and FullVector for float, double and bool
Move code definition from header (.h) to translation unit (.cpp or .inl).
Forward declare Mat<> in sofa/type/fwd.h
Replace AClass::Index with the generic sofa::Index;

If you were using AClass::Index, use sofa::Index instead
If you do your own template instanciation don't forget to include the corresponding .inl file instead of the .h


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

…rn template for double/float/bool

Don't forget to include the .inl if you want to instanciate the templates for other types.
@damienmarchal damienmarchal added pr: clean Cleaning the code pr: status wip Development in the pull-request is still in progress labels Feb 8, 2021
@damienmarchal damienmarchal changed the title [SofaBaseLinearSolver] Minor cleaning in FullMatrix & FullVector. [SofaBaseLinearSolver]Cleaning in FullMatrix & FullVector & MechanicalState Feb 11, 2021
@damienmarchal damienmarchal added pr: status to review To notify reviewers to review this pull-request pr: breaking Change possibly inducing a compilation error and removed pr: status wip Development in the pull-request is still in progress labels Feb 16, 2021
@damienmarchal
Copy link
Contributor Author

[ci-build][with-scene-tests][with-regression-tests]

@damienmarchal damienmarchal added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Feb 17, 2021
@damienmarchal damienmarchal added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Feb 18, 2021
# Conflicts:
#	SofaKernel/modules/SofaCore/src/sofa/core/behavior/MechanicalState.cpp
#	SofaKernel/modules/SofaCore/src/sofa/core/behavior/MechanicalState.h
#	SofaKernel/modules/SofaCore/src/sofa/core/behavior/MechanicalState.inl
It was doing the same as DataTypeInfo but only for float/double while DataTypeInfo was working
everytime.
@damienmarchal damienmarchal added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Feb 22, 2021
@damienmarchal
Copy link
Contributor Author

[ci-build][with-scene-tests][with-regression-tests]

typedef Mat<4,4,SReal> Matrix4;
}

/// Deprecated namespace.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put back those typedefs to compat/sofa/defaulttype/Mat.h

@damienmarchal
Copy link
Contributor Author

Back to review,
Poke @fredroy, @hugtalbot

@fredroy
Copy link
Contributor

fredroy commented Feb 24, 2021

good for me 😗

# Conflicts:
#	SofaKernel/modules/Sofa.Type/CMakeLists.txt
#	SofaKernel/modules/SofaDefaultType/compat/sofa/defaulttype/Mat.h
#	SofaKernel/modules/SofaDefaultType/src/sofa/defaulttype/fwd.h
@damienmarchal
Copy link
Contributor Author

I removed the conflict... let's go for a CI ride.

@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Feb 25, 2021
@fredroy fredroy merged commit 99b600a into sofa-framework:master Feb 25, 2021
@guparan guparan added this to the v21.06 milestone Feb 26, 2021
damienmarchal added a commit to CRIStAL-PADR/sofa that referenced this pull request Mar 1, 2021
…alState (sofa-framework#1792)

* WIP

* [SofaBaseLinearSolver] Move definition in .inl instead of .h and extern template for double/float/bool

Don't forget to include the .inl if you want to instanciate the templates for other types.

* Add SparseLUSolver.inl in CMakeLists.txt

* WIP remove includes.

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Update for  Sofa.Type

* FIX

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* FIX A BUG In BTD

* Add sofa::SignedIndex in sofa/config.h.in

* WIP

* Use sofa::Index in MultiMatrixAccessor.

* Use sofa::SignedIndex where relevant.

* Remove Name() method in CompressRowSparseMatrix

It was doing the same as DataTypeInfo but only for float/double while DataTypeInfo was working
everytime.

* Use sofa::SignedIndex instead fo sofa:Index as some loops are going backward.

* Update config.h.in

* FIXUP

* FIXUP
damienmarchal added a commit to CRIStAL-PADR/sofa that referenced this pull request Mar 4, 2021
…alState (sofa-framework#1792)

* WIP

* [SofaBaseLinearSolver] Move definition in .inl instead of .h and extern template for double/float/bool

Don't forget to include the .inl if you want to instanciate the templates for other types.

* Add SparseLUSolver.inl in CMakeLists.txt

* WIP remove includes.

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Update for  Sofa.Type

* FIX

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* FIX A BUG In BTD

* Add sofa::SignedIndex in sofa/config.h.in

* WIP

* Use sofa::Index in MultiMatrixAccessor.

* Use sofa::SignedIndex where relevant.

* Remove Name() method in CompressRowSparseMatrix

It was doing the same as DataTypeInfo but only for float/double while DataTypeInfo was working
everytime.

* Use sofa::SignedIndex instead fo sofa:Index as some loops are going backward.

* Update config.h.in

* FIXUP

* FIXUP
alxbilger pushed a commit to alxbilger/sofa that referenced this pull request Oct 27, 2023
…alState (sofa-framework#1792)

* WIP

* [SofaBaseLinearSolver] Move definition in .inl instead of .h and extern template for double/float/bool

Don't forget to include the .inl if you want to instanciate the templates for other types.

* Add SparseLUSolver.inl in CMakeLists.txt

* WIP remove includes.

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Update for  Sofa.Type

* FIX

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* FIX A BUG In BTD

* Add sofa::SignedIndex in sofa/config.h.in

* WIP

* Use sofa::Index in MultiMatrixAccessor.

* Use sofa::SignedIndex where relevant.

* Remove Name() method in CompressRowSparseMatrix

It was doing the same as DataTypeInfo but only for float/double while DataTypeInfo was working
everytime.

* Use sofa::SignedIndex instead fo sofa:Index as some loops are going backward.

* Update config.h.in

* FIXUP

* FIXUP
alxbilger pushed a commit to alxbilger/sofa that referenced this pull request Oct 27, 2023
…alState (sofa-framework#1792)

* WIP

* [SofaBaseLinearSolver] Move definition in .inl instead of .h and extern template for double/float/bool

Don't forget to include the .inl if you want to instanciate the templates for other types.

* Add SparseLUSolver.inl in CMakeLists.txt

* WIP remove includes.

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Update for  Sofa.Type

* FIX

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* FIX A BUG In BTD

* Add sofa::SignedIndex in sofa/config.h.in

* WIP

* Use sofa::Index in MultiMatrixAccessor.

* Use sofa::SignedIndex where relevant.

* Remove Name() method in CompressRowSparseMatrix

It was doing the same as DataTypeInfo but only for float/double while DataTypeInfo was working
everytime.

* Use sofa::SignedIndex instead fo sofa:Index as some loops are going backward.

* Update config.h.in

* FIXUP

* FIXUP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: breaking Change possibly inducing a compilation error pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants