You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
151 lines
2.3 KiB
151 lines
2.3 KiB
|
1 week ago
|
#pragma once
|
||
|
|
|
||
|
|
struct LargeSOA {
|
||
|
|
std::vector<int> a01;
|
||
|
|
std::vector<int> a02;
|
||
|
|
std::vector<int> a03;
|
||
|
|
std::vector<int> a04;
|
||
|
|
std::vector<int> a05;
|
||
|
|
std::vector<int> a06;
|
||
|
|
std::vector<int> a07;
|
||
|
|
std::vector<int> a08;
|
||
|
|
std::vector<int> a09;
|
||
|
|
std::vector<int> a10;
|
||
|
|
std::vector<int> a11;
|
||
|
|
std::vector<int> a12;
|
||
|
|
std::vector<int> a13;
|
||
|
|
std::vector<int> a14;
|
||
|
|
std::vector<int> a15;
|
||
|
|
std::vector<int> a16;
|
||
|
|
std::vector<int> a17;
|
||
|
|
std::vector<int> a18;
|
||
|
|
std::vector<int> a19;
|
||
|
|
std::vector<int> a20;
|
||
|
|
|
||
|
|
void push_back(int x) {
|
||
|
|
a01.push_back(x);
|
||
|
|
a02.push_back(x);
|
||
|
|
a03.push_back(x);
|
||
|
|
a04.push_back(x);
|
||
|
|
a05.push_back(x);
|
||
|
|
a06.push_back(x);
|
||
|
|
a07.push_back(x);
|
||
|
|
a08.push_back(x);
|
||
|
|
a09.push_back(x);
|
||
|
|
a10.push_back(x);
|
||
|
|
a11.push_back(x);
|
||
|
|
a12.push_back(x);
|
||
|
|
a13.push_back(x);
|
||
|
|
a14.push_back(x);
|
||
|
|
a15.push_back(x);
|
||
|
|
a16.push_back(x);
|
||
|
|
a17.push_back(x);
|
||
|
|
a18.push_back(x);
|
||
|
|
a19.push_back(x);
|
||
|
|
a20.push_back(x);
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
struct LargeStruct {
|
||
|
|
int a01;
|
||
|
|
int a02;
|
||
|
|
int a03;
|
||
|
|
int a04;
|
||
|
|
int a05;
|
||
|
|
int a06;
|
||
|
|
int a07;
|
||
|
|
int a08;
|
||
|
|
int a09;
|
||
|
|
int a10;
|
||
|
|
int a11;
|
||
|
|
int a12;
|
||
|
|
int a13;
|
||
|
|
int a14;
|
||
|
|
int a15;
|
||
|
|
int a16;
|
||
|
|
int a17;
|
||
|
|
int a18;
|
||
|
|
int a19;
|
||
|
|
int a20;
|
||
|
|
|
||
|
|
LargeStruct(int x) :
|
||
|
|
a01(x),
|
||
|
|
a02(x),
|
||
|
|
a03(x),
|
||
|
|
a04(x),
|
||
|
|
a05(x),
|
||
|
|
a06(x),
|
||
|
|
a07(x),
|
||
|
|
a08(x),
|
||
|
|
a09(x),
|
||
|
|
a10(x),
|
||
|
|
a11(x),
|
||
|
|
a12(x),
|
||
|
|
a13(x),
|
||
|
|
a14(x),
|
||
|
|
a15(x),
|
||
|
|
a16(x),
|
||
|
|
a17(x),
|
||
|
|
a18(x),
|
||
|
|
a19(x),
|
||
|
|
a20(x) {}
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
struct S1 {
|
||
|
|
int a01;
|
||
|
|
int a02;
|
||
|
|
int a03;
|
||
|
|
int a04;
|
||
|
|
|
||
|
|
S1(int x) : a01(x), a02(x), a03(x), a04(x) { }
|
||
|
|
};
|
||
|
|
|
||
|
|
struct S2 {
|
||
|
|
int a05;
|
||
|
|
int a06;
|
||
|
|
int a07;
|
||
|
|
int a08;
|
||
|
|
S2(int x) : a05(x), a06(x), a07(x), a08(x) { }
|
||
|
|
};
|
||
|
|
|
||
|
|
struct S3 {
|
||
|
|
int a09;
|
||
|
|
int a10;
|
||
|
|
int a11;
|
||
|
|
int a12;
|
||
|
|
S3(int x) : a09(x), a10(x), a11(x), a12(x) { }
|
||
|
|
};
|
||
|
|
|
||
|
|
struct S4 {
|
||
|
|
int a13;
|
||
|
|
int a14;
|
||
|
|
int a15;
|
||
|
|
int a16;
|
||
|
|
S4(int x) : a13(x), a14(x), a15(x), a16(x) { }
|
||
|
|
};
|
||
|
|
|
||
|
|
struct S5 {
|
||
|
|
int a17;
|
||
|
|
int a18;
|
||
|
|
int a19;
|
||
|
|
int a20;
|
||
|
|
S5(int x) : a17(x), a18(x), a19(x), a20(x) { }
|
||
|
|
};
|
||
|
|
|
||
|
|
struct MultipleAOS {
|
||
|
|
std::vector<S1> s1;
|
||
|
|
std::vector<S2> s2;
|
||
|
|
std::vector<S3> s3;
|
||
|
|
std::vector<S4> s4;
|
||
|
|
std::vector<S5> s5;
|
||
|
|
|
||
|
|
void push_back(int x) {
|
||
|
|
s1.push_back({x});
|
||
|
|
s2.push_back({x});
|
||
|
|
s3.push_back({x});
|
||
|
|
s4.push_back({x});
|
||
|
|
s5.push_back({x});
|
||
|
|
}
|
||
|
|
};
|