Recently I've found myself having to do math on floats, but do testing against associated integer masks, and I'd like to reduce the pain associated with working with select() in these scenarios.
The library has batch_cast for regular batch, but no equivalent for their batch_bool friends. There's some undocumented bool_cast() functions but they aren't generalized at all and don't appear to be what I'm looking for. Also the somewhat ominous //FIXME comment next to them suggests that I maybe shouldn't depend on these being present 😅
I have hacked this together in my own codebase, and it seems to serve the purpose:
Hiya,
Recently I've found myself having to do math on floats, but do testing against associated integer masks, and I'd like to reduce the pain associated with working with
select()in these scenarios.The library has😅
batch_castfor regularbatch, but no equivalent for theirbatch_boolfriends. There's some undocumentedbool_cast()functions but they aren't generalized at all and don't appear to be what I'm looking for. Also the somewhat ominous//FIXMEcomment next to them suggests that I maybe shouldn't depend on these being presentI have hacked this together in my own codebase, and it seems to serve the purpose:
I think something like this would be a useful addition to the library itself to complement the existing
batch_cast().The text was updated successfully, but these errors were encountered: