Finally I used std::bitset for that purpose, added some operators and made conversion to/from python long. I also created cmake option (off by default) for it. I did it in general way, so if you needed to use it in other place than Body::groupMask, it should be easy. Thanks for feedback and suggestions Cheers Jan
2014-06-06 13:12 GMT+02:00 Jan Stránský <[email protected]>: > Hi Anton, > Do you mean to replace boost::python::long_ by groupMask_t? > if BODY_GROUP_MASK_ARBITRARY_PRECISION is defined, both argument types (int > and bp::long_) are needed.. > cheers > Jan > > > 2014-06-06 13:07 GMT+02:00 Anton Gladky <[email protected]>: > > 2014-06-06 10:47 GMT+02:00 Jan Stránský <[email protected]>: >> > I am soory, I am not sure what exactly is the point here :-) The >> duplicate >> > code in maskOk and maskCompatible? int argument is necessary as some >> other >> > classes uses ints (like NewtonIntegrator or >> > collider::avoidSelfInteractionMask), bp::long_ is optionally for >> body-body >> > evaluation. Probably I could template it. >> >> From my point of view we should have just one possible typedef for >> groupmask: int or boost, >> depending on the BODY_GROUP_MASK_ARBITRARY_PRECISION flag. >> >> Regards >> >> Anton >> > >
_______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

