Skip to content

Commit

Permalink
Attempt2 memory_bound/data_packing lab
Browse files Browse the repository at this point in the history
  • Loading branch information
mrboojum committed Dec 20, 2024
1 parent 293b237 commit b35e282
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions labs/memory_bound/data_packing/solution.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ constexpr int maxRandom = 100;

// FIXME: this data structure can be reduced in size
struct S {
long long l;
double d;
int i;
short s;
bool b;
float d;
long long l:16;
int i:8;
short s:7;
bool b:1;

bool operator<(const S &s) const { return this->i < s.i; }
};

template<int N>
class TD;

//TD<sizeof(S)> td;

void init(std::array<S, N> &arr);
S create_entry(int first_value, int second_value);
void solution(std::array<S, N> &arr);

0 comments on commit b35e282

Please sign in to comment.