typedef float sx5x10_t __attribute__((matrix_type(5, 10)));
typedef int ix3x2_t __attribute__((matrix_type(3, 2)));
typedef double dx3x3 __attribute__((matrix_type(3, 3)));
typedef unsigned ix3x3 __attribute__((matrix_type(3, 3)));
typedef float [[clang::matrix_type(5, 10)]] sx5x10_t;
typedef int [[clang::matrix_type(3, 2)]] ix3x2_t;
[[clang::matrix_type(5, 10)]] typedef float sx5x10_t;
[[clang::matrix_type(3, 2)]] typedef int ix3x2_t;
[[clang::matrix_type(3, 2)]] int ix3x2_var;
int [[clang::matrix_type(3, 2)]] ix3x2_var;
void transpose(sx5x10_t a, ix3x2_t b, dx3x3 c, int *d, int e) {
a = __builtin_matrix_transpose(b);
b = __builtin_matrix_transpose(b);
__builtin_matrix_transpose(d);
__builtin_matrix_transpose(e);
__builtin_matrix_transpose("test");
ix3x3 m = __builtin_matrix_transpose(c);
}
struct Foo {
unsigned x;
};
void column_major_load(float *p1, int *p2, _Bool *p3, struct Foo *p4) {
sx5x10_t a1 = __builtin_matrix_column_major_load(p1, 5, 11, 5);
sx5x10_t a2 = __builtin_matrix_column_major_load(p1, 5, 9, 5);
sx5x10_t a3 = __builtin_matrix_column_major_load(p1, 6, 10, 6);
sx5x10_t a4 = __builtin_matrix_column_major_load(p1, 4, 10, 4);
sx5x10_t a5 = __builtin_matrix_column_major_load(p1, 6, 9, 6);
sx5x10_t a6 = __builtin_matrix_column_major_load(p2, 5, 10, 6);
sx5x10_t a7 = __builtin_matrix_column_major_load(p1, 5, 10, 3);
sx5x10_t a8 = __builtin_matrix_column_major_load(p3, 5, 10, 6);
sx5x10_t a9 = __builtin_matrix_column_major_load(p4, 5, 10, 6);
sx5x10_t a10 = __builtin_matrix_column_major_load(p1, 1ull << 21, 10, 6);
sx5x10_t a11 = __builtin_matrix_column_major_load(p1, 10, 1ull << 21, 10);
sx5x10_t a12 = __builtin_matrix_column_major_load(
10, 1ull << 21, 1ull << 21, "");
sx5x10_t a13 = __builtin_matrix_column_major_load(
10, *p4, "", 10);
}
void column_major_store(sx5x10_t *m1, ix3x2_t *m2, float *p1, int *p2, struct Foo *p3, const float *p4) {
__builtin_matrix_column_major_store(*m1, p1, 1);
__builtin_matrix_column_major_store(*m1, p1, 0);
__builtin_matrix_column_major_store(*m1, p2, 10);
__builtin_matrix_column_major_store(p1, p2, 10);
__builtin_matrix_column_major_store(
"", 10, *p3);
__builtin_matrix_column_major_store(
*m1,
10, 10);
*m1 = __builtin_matrix_column_major_store(*m1, p1, 10);
int x = __builtin_matrix_column_major_store(*m1, p1, 10);
__builtin_matrix_column_major_store(*m1, p4, 20);
}