meaning of ENABLE_MASK_ARBITRARY

Asked by Luc OGER on 2019-08-29

I need some explanation:

In order to understand why the use of the mask is not functionning in some recent CPU envrionment (see 682290), I am looking inside the code of collider.cpp or body.cpp and I founded the ifdef option of YADE_MASK_ARBITRARY.
I guess that this option is controled by ENABLE_MASK_ARBITRARY cmake option but I did not founded what is his use and his need.

could you provied me some hints or links to the place for th explanation

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-08-29
Last reply:
2019-08-30
Robert Caulk (rcaulk) said : #1

>could you provied me some hints or links to the place for th explanation

Sure, but first could you provide some links to the code you are referring to? :-)

Luc OGER (luc-oger) said : #2

i am still trying to understand why with some CPU environment the use of collider.avoidSelfInteractionMask is funcitonning well or not (see https://answers.launchpad.net/yade/+question/682290)

So I founded this option but without knowing how it is working????

Jan Stránský (honzik) said : #3

Hi Luc,

TLTR: it is not related to your problem

Body.mask in Python or Body::groupMaks in C++ is of type int, which is usually 64 bit number. If you need / want a higher number of bits (not usual case), you can use std::bitset instead.

The latter is used if YADE_MASK_ARBITRARY macro is defined (done by cmake if ENABLE_MASK_ARBITRARY=ON is passed to cmake). The size of the mask is defined at compile time by MASK_ARBITRARY_SIZE macro.

cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/blob/master/core/Body.hpp#L84
[2] https://gitlab.com/yade-dev/trunk/blob/master/lib/base/Math.hpp#L274
[3] https://gitlab.com/yade-dev/trunk/blob/master/lib/base/Math.hpp#L260

Can you help with this problem?

Provide an answer of your own, or ask Luc OGER for more information if necessary.

To post a message you must log in.