using alignas(32) in NNUE | bench 10737067
This commit is contained in:
1 parent
2ea6bd1c64
commit
ddbd378d16
2 files changed
+6
-6
No files matched your search
@@ -4,12 +4,12 @@
|
|||||||
namespace ACC {
|
namespace ACC {
|
||||||
|
|
||||||
struct Accumulator {
|
struct Accumulator {
|
||||||
std::array<int16_t, NNUE::HL_SIZE> values;
|
alignas(32) std::array<int16_t, NNUE::HL_SIZE> values;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AccumulatorPair {
|
struct AccumulatorPair {
|
||||||
Accumulator white;
|
alignas(32) Accumulator white;
|
||||||
Accumulator black;
|
alignas(32) Accumulator black;
|
||||||
|
|
||||||
// yoinked from Quinniboi - Prelude
|
// yoinked from Quinniboi - Prelude
|
||||||
void addSub(bool stm, int add, int addPT, int sub, int subPT);
|
void addSub(bool stm, int add, int addPT, int sub, int subPT);
|
||||||
|
|||||||
+3
-3
@@ -15,9 +15,9 @@ constexpr int QA = 255;
|
|||||||
constexpr int QB = 64;
|
constexpr int QB = 64;
|
||||||
|
|
||||||
struct Network {
|
struct Network {
|
||||||
std::array<int16_t, HL_SIZE * INPUT_SIZE> accumulator_weights;
|
alignas(32) std::array<int16_t, HL_SIZE * INPUT_SIZE> accumulator_weights;
|
||||||
std::array<int16_t, HL_SIZE> accumulator_biases;
|
alignas(32) std::array<int16_t, HL_SIZE> accumulator_biases;
|
||||||
std::array<int16_t, 2 * HL_SIZE> output_weights;
|
alignas(32) std::array<int16_t, 2 * HL_SIZE> output_weights;
|
||||||
int16_t output_bias;
|
int16_t output_bias;
|
||||||
|
|
||||||
void Load(const std::string& path);
|
void Load(const std::string& path);
|
||||||
|
|||||||
Reference in new issue
Block a user