mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-07 20:53:55 -05:00
square64 transpose without AVX2.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
#include "square64.h"
|
||||
#include "Tools/cpu_support.h"
|
||||
#include "OT/BitMatrix.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
@@ -102,6 +104,18 @@ void square64::transpose(int n_rows, int n_cols)
|
||||
assert(n_rows <= 64);
|
||||
assert(n_cols <= 64);
|
||||
|
||||
#ifndef __AVX2__
|
||||
square128 tmp2;
|
||||
tmp2.set_zero();
|
||||
for (int i = 0; i < n_rows; i++)
|
||||
tmp2.rows[i] = _mm_cvtsi64_si128(rows[i]);
|
||||
tmp2.transpose();
|
||||
*this = {};
|
||||
for (int i = 0; i < n_cols; i++)
|
||||
rows[i] = _mm_cvtsi128_si64(tmp2.rows[i]);
|
||||
return;
|
||||
#endif
|
||||
|
||||
square64 tmp = *this;
|
||||
*this = {};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <mpirxx.h>
|
||||
|
||||
#include "BitMatrix.h"
|
||||
#include "OT/BitMatrix.h"
|
||||
#include "Tools/random.h"
|
||||
#include "Tools/BitVector.h"
|
||||
#include "Tools/intrinsics.h"
|
||||
Reference in New Issue
Block a user