-
Notifications
You must be signed in to change notification settings - Fork 199
Description
Currently the Futhark compiler always does a transformation to an array of records/tuples such that it becomes a tuple/record of arrays (which is commonly called a struct of arrays transformation). This is not always ideal in cases where you are doing random reading like in hash maps you would much rather have an array of structs. So I believe the Futhark language should have a feature for avoiding the struct of arrays transformation. One possible idea is to have an attribute #[aos] to put in front of expressions to tell the compiler that the array of possible tuples/records should not become an struct of arrays. In the IR the arrays are labeled and these labels are then used during allocation to braid arrays together to obtain the desired effect of having an array of structs.