I can initialize float32x4_t like this:
const float32x4x4_t zero = { 0.0f, 0.0f, 0.0f, 0.0f };
But this code makes an error Incompatible types in initializer:
const float32x4x4_t one =
{
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
};
float32x4x4_t is 4x4 matrix built as:
typedef struct float32x4x4_t
{
float32x4_t val[4];
}
float32x4x4_t;
How can I initialize this const struct?
const float32x4x4_t nameOfVariableHere =
{{
{1.0f, 1.0f, 1.0f, 1.0f},
{1.0f, 1.0f, 1.0f, 1.0f},
{1.0f, 1.0f, 1.0f, 1.0f},
{1.0f, 1.0f, 1.0f, 1.0f}
}};
The 1st level of parenthesis is for the struct.
The 2nd level is for the array of float32x4_t
.
The 3rd level is for float32x4_t
itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With