stfc / RegentParticleDSL

A particle-method DSL based on Regent programming language
MIT License
1 stars 0 forks source link

Better translation from 1D to 3D direction #58

Closed LonelyCat124 closed 3 years ago

LonelyCat124 commented 3 years ago

At the moment a massive if/then/elseif block is used to switch between {x,y,z} and 0->26.

I'm pretty sure using either binary arithmetic this should be much simpler.

LonelyCat124 commented 3 years ago

Not binary, but tertiary arithmetic makes it easy.

Question to look up - is there a simple/fast way to compute the remainder for dividing by 3?

LonelyCat124 commented 3 years ago

I'm not worried about this now, I think its fine.