Files
MP-SPDZ/GC/square64.h
Marcel Keller cc0711c224 MP-SPDZ.
2018-10-11 17:20:26 +11:00

37 lines
575 B
C

/*
* square64.h
*
*/
#ifndef GC_SQUARE64_H_
#define GC_SQUARE64_H_
#include <immintrin.h>
#include <string.h>
#include "Tools/int.h"
union square64
{
__m256i quadrows[16];
__m128i doublerows[32];
int64_t rows[64];
int32_t halfrows[128][2];
octet bytes[64][8];
square64()
{
memset(bytes, 0, sizeof(bytes));
}
bool get_bit(int x, int y)
{ return (bytes[x][y/8] >> (y % 8)) & 1; }
void transpose(int n_rows, int n_cols);
bool operator!=(const square64& other);
void print();
};
#endif /* GC_SQUARE64_H_ */