3 ms·
I mostly use signed... but one of my primary activities is to use uint8, uint16, and uint32 for indexes and indexes into indexes etc. The workflow was designed
by cjbgkagh 5y ago
I mostly use signed... but one of my primary activities is to use uint8, uint16, and uint32 for indexes and indexes into indexes etc. The workflow was designed around the various uint size limitations so that they are not exceeded. Uint32 is the largest chunk size that I use. The fact that it is twice as big as an Int32 is handy. It allows me to pass bigger chunks to the GPU. Plus I'm already working with uint8 and uint16 so it's consistent. I've not needed Uint64 or Int64 but it would vastly increase memory size for no benefit for my use case. Memory is cheap but I'm bottlenecked by memory bandwidth. I've looked into using variable ints but I haven't needed them yet. For things that I know I'm going to scan over having compressed variable ints of a diffed sorted bag would be great but I would need to write a ton of custom CPU and GPU code for it. You can index into variable ints with a post process provided a maximum number constraint and some padding on the end.
This sort of code is written very carefully and mistakes give completely wrong answers so they are noticed right away.