cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

viscocoa
Adept I

Question regarding registers

What is the addressable unit of registers? A byte or a 4-byte integer/float, or a 16-byte vector?

If I declare a byte type private variable, will it occupy a 1-byte register, or 4-, or 16-byte register?

How are registers used by the ALU? In the following statements,

float4 x;

x.a = 1.f;                              // writing to the first element of x

float y = x.b + 2.f;                // reading the second element of x

can the last two instructions be excuted simultaneously?

Thank you in advance!

0 Likes
1 Solution

1) A character occupies a 4 bytes of 16 byte registers.

2) They may be packed into 4 components of up to 4 different registers.

3) No, what is in a vector in the source does not directly correspond to what is in a vector register.

View solution in original post

0 Likes
10 Replies