Sort out types of indices (Feature #203)

Added by Matthias Bach almost 8 years ago.

Status:New Start date:05 Oct 2011
Priority:Normal Due date:
Assignee:Matthias Bach % Done:


Target version:-


Currently most indices are signed integers or arrays thereof. As these types can never be negative they shouldn't be signed. Array types seem to cause issues as #153 shows. To make things easy for the compiler each type should be as close to it's actual usage as possible.

  • A good type for 4-dimensional indices would probably be uint4 (We should never need moren than 2^32-1 in any direction.
    In that case x, y and z would represent to spatial indices, w could represent the time direction.
  • Analog to the 4-dimensional indices 3-dimensional indices could use uint3
  • The flattend 1-dimensional index is usually used for memory access, therefore size_t would be an appropriate type as it can be added to pointers (e.g. in array access) without conversion.


Also available in: Atom PDF