Loads a vector from the given memory address.
d=vec_ld(a, b)
d=vec_lda(a, b)
The following table describes the types of the returned value and the function arguments.
d | a | b |
---|---|---|
vector4double | long | long* |
unsigned long* | ||
long long* | ||
unsigned long long* | ||
float* | ||
_Complex float* | ||
double* | ||
_Complex double* |
The effective address (EA) is the sum of a and b. The effective address is truncated to an n-byte alignment depending on the type of b as shown in the following table. The result is the content of the n bytes of memory starting at the effective address.
Type of b | n |
---|---|
long* unsigned long* long long* unsigned long long* |
32 |
float* | 16 |
_Complex float* | |
double* | 32 |
_Complex double* |
vec_lda generates an exception (SIGBUS) if the effective address is not aligned to the appropriate memory boundary indicated in the table.
If b is a pointer to a variable of the single-precision floating-point type or single-precision complex type, the values loaded from memory are converted to double precision before being saved to the result value.
The following table shows the formulas depending on the type of b.
Type of b | Formula |
---|---|
long* unsigned long* long long* unsigned long long* |
|
float* |
|
_Complex float* | |
double* |
|
_Complex double* |
Type of b | Memory values | d |
---|---|---|
long* unsigned long* long long* unsigned long long* |
0x4024000000000000, 0x4034000000000000, 0x403E000000000000, 0x4044000000000000 |
(10.0, 20.0, 30.0, 40.0) |
float* | 10.0f, 20.0f, 30.0f, 40.0f | (10.0, 20.0, 30.0, 40.0) |
_Complex float* | (10.0f, 20.0f) (30.0f, 40.0f) | |
double* | 10.0, 20.0, 30.0, 40.0 | |
_Complex double* | (10.0, 20.0) (30.0, 40.0) |