Page MenuHomePhabricator

File Metadata

Author
mroth
Created
Sep 5 2014, 8:38 AM
#define TYPE float
#define LEN2 256
#define ALIGNMENT 16
#define LEN 32000
struct GlobalData {
__attribute__((aligned(ALIGNMENT))) TYPE a[LEN];
int pad1[3];
__attribute__((aligned(ALIGNMENT))) TYPE b[LEN];
int pad2[5];
__attribute__((aligned(ALIGNMENT))) TYPE c[LEN];
int pad3[7];
__attribute__((aligned(ALIGNMENT))) TYPE d[LEN];
int pad4[11];
__attribute__((aligned(ALIGNMENT))) TYPE e[LEN];
int pad5[13];
__attribute__((aligned(ALIGNMENT))) TYPE aa[LEN2][LEN2];
} global_data;
__attribute__((aligned(ALIGNMENT))) TYPE (* const aa)[LEN2] = global_data.aa;
int set2d(TYPE arr[LEN2][LEN2], TYPE value, int stride)
{
// -- initialize two-dimensional arraysft
for (int i = 0; i < LEN2; i++) {
for (int j = 0; j < LEN2; j++) {
arr[i][j] = 1. / (TYPE) (i+1);
}
}
return 0;
}
int main(void) {
int frac = -1;
TYPE any = 0;
set2d(aa, any, frac);
}

Event Timeline

mroth changed the visibility from "mroth (Moritz Roth)" to "Public (No Login Required)".Sep 5 2014, 8:40 AM