[Sorry, forgot to CC: the list]
Hi Ira,
Thanks for the feedback.
On 6 March 2011 09:20, Ira Rosen IRAR@il.ibm.com wrote:
So how about the following functions? (Forgive the pascally syntax.)
__builtin_load_lanes (REF : array N*M of X) returns array N of vector M of X maps to vldN in practice, the result would be used in assignments of the form: vectorX = ARRAY_REF <result, X>
__builtin_store_lanes (VECTORS : array N of vector M of X) returns array N*M of X maps to vstN in practice, the argument would be populated by assignments ofthe
form:
vectorX = ARRAY_REF <result, X>
__builtin_load_lane (REF : array N of X, VECTORS : array N of vector M of X, LANE : integer) returns array N of vector M of X maps to vldN_lane
__builtin_store_lane (VECTORS : array N of vector M of X, LANE : integer) returns array N of X maps to vstN_lane
How do you distinguish between "multiple structures" and "single structure to all lanes"?
Sorry, I'm not sure I understand the question. Could you give a couple of examples?
The idea is that the arrays above really are array types, regardless of the actual type of the thing we're accessing (which might be a larger array than the bounds above say, or which might be an array of structures or a structure of arrays). That should be OK because arrays alias their elements.
Richard
[Sorry, forgot to CC: the list]
Hi Ira,
Thanks for the feedback.
On 6 March 2011 09:20, Ira Rosen IRAR@il.ibm.com wrote:
So how about the following functions? (Forgive the pascally syntax.)
__builtin_load_lanes (REF : array N*M of X) returns array N of vector M of X maps to vldN in practice, the result would be used in assignments of the
form:
vectorX = ARRAY_REF <result, X>
__builtin_store_lanes (VECTORS : array N of vector M of X) returns array N*M of X maps to vstN in practice, the argument would be populated by assignments
ofthe
form:
vectorX = ARRAY_REF <result, X>
__builtin_load_lane (REF : array N of X, VECTORS : array N of vector M of X, LANE : integer) returns array N of vector M of X maps to vldN_lane
__builtin_store_lane (VECTORS : array N of vector M of X, LANE : integer) returns array N of X maps to vstN_lane
How do you distinguish between "multiple structures" and "single
structure
to all lanes"?
Sorry, I'm not sure I understand the question. Could you give a couple of examples?
Sorry, I guess I just don't understand the syntax. I meant to ask about three different types of vld/vst. For example, vld3 can be (1) multiple 3-element structures: loads multiple 3-element structures into 3 registers (2) single 3-element structure to one lane: loads one 3-element structure into corresponding elements of 3 registers (3) single 3-element structure to all lanes: loads one 3-element structure into all lanes of 3 registers.
I understood that __builtin_load_lanes implements (1) and __builtin_load_lane implements (2), is that correct? And what function corresponds to (3)? __builtin_load_lanes?
Thanks, Ira
The idea is that the arrays above really are array types, regardless of
the
actual type of the thing we're accessing (which might be a larger array than the bounds above say, or which might be an array of structures or a structure of arrays). That should be OK because arrays alias their elements.
Richard
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
Ira Rosen IRAR@il.ibm.com writes:
How do you distinguish between "multiple structures" and "single
structure
to all lanes"?
Sorry, I'm not sure I understand the question. Could you give a couple of examples?
Sorry, I guess I just don't understand the syntax. I meant to ask about three different types of vld/vst. For example, vld3 can be (1) multiple 3-element structures: loads multiple 3-element structures into 3 registers (2) single 3-element structure to one lane: loads one 3-element structure into corresponding elements of 3 registers (3) single 3-element structure to all lanes: loads one 3-element structure into all lanes of 3 registers.
I understood that __builtin_load_lanes implements (1) and __builtin_load_lane implements (2), is that correct? And what function corresponds to (3)? __builtin_load_lanes?
Sorry, my bad. Like you say, I suppose the two options are to (a) overload __builtin_load_lanes or (b) have a third built-in function. And as you imply, I suppose (b) is going to be less confusing.
Do you have any suggestions for names? __builtin_load_replicate?
Richard
On 15 March 2011 13:30, Richard Sandiford richard.sandiford@linaro.orgwrote:
Ira Rosen IRAR@il.ibm.com writes:
How do you distinguish between "multiple structures" and "single
structure
to all lanes"?
Sorry, I'm not sure I understand the question. Could you give a couple of examples?
Sorry, I guess I just don't understand the syntax. I meant to ask about three different types of vld/vst. For example, vld3 can be (1) multiple 3-element structures: loads multiple 3-element structures
into
3 registers (2) single 3-element structure to one lane: loads one 3-element structure into corresponding elements of 3 registers (3) single 3-element structure to all lanes: loads one 3-element
structure
into all lanes of 3 registers.
I understood that __builtin_load_lanes implements (1) and __builtin_load_lane implements (2), is that correct? And what function corresponds to (3)? __builtin_load_lanes?
Sorry, my bad. Like you say, I suppose the two options are to (a) overload __builtin_load_lanes or (b) have a third built-in function. And as you imply, I suppose (b) is going to be less confusing.
Yes, I prefer (b) :)
Do you have any suggestions for names? __builtin_load_replicate?
Sounds good.
Ira
Richard
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
linaro-toolchain@lists.linaro.org