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

Extend interface with masking operations. #33

Open
edanor opened this issue Aug 12, 2016 · 0 comments
Open

Extend interface with masking operations. #33

edanor opened this issue Aug 12, 2016 · 0 comments

Comments

@edanor
Copy link
Owner

edanor commented Aug 12, 2016

Originally reported by: edanor (Bitbucket: edanor, GitHub: edanor)


As for other interfaces, masks should also implement MFI functions with masking operand. An example where it causes problems comes from VecGeom:

VECGEOM_FORCE_INLINE
void MaskedAssign(UmesimdBool_v const &cond, UmesimdBool_v const &thenval, UmesimdBool_v *const output)
{
//output->assign(cond, thenval);
UmesimdBool_v out_v;
out_v.assign(*output);
UmesimdBool_v t0 = cond.land(thenval);
UmesimdBool_v t1 = (!cond).land(out_v);
UmesimdBool_v t2 = t0 || t1;
output->assign(t2);
}

here the overloaded 'MaskedAssign' operation tries to perform blending between two masks.

If usage model comes from the users it should be provided automatically.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant