61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
#ifndef CONF_H
|
|
#define CONF_H
|
|
#include <iostream>
|
|
#include <fstream>
|
|
#include <iomanip>
|
|
#include <algorithm>
|
|
#include <tuple>
|
|
#include <tbb/task_scheduler_init.h>
|
|
#include <tbb/concurrent_vector.h>
|
|
#include <tbb/parallel_for.h>
|
|
#include <tbb/parallel_for_each.h>
|
|
#include <tbb/parallel_sort.h>
|
|
#include <tbb/partitioner.h>
|
|
#include <tbb/task.h>
|
|
#include <chrono>
|
|
#include <immintrin.h>
|
|
|
|
using namespace std::chrono;
|
|
using namespace std;
|
|
using namespace tbb;
|
|
|
|
//#define monomial int
|
|
#define uint64 unsigned long long
|
|
#define int64 long long
|
|
#define uint unsigned int
|
|
#define MAX_ROWS 2000000
|
|
#define MAX_POLYS 50000
|
|
#define PART_ROWS 8000
|
|
#define MAX_INPUT_POLYS 161
|
|
constexpr int comb(int n, int r)
|
|
{
|
|
int temp = 1;
|
|
for (int i = 1; i <= r; i++)
|
|
{
|
|
temp *= (n - i + 1);
|
|
temp /= i;
|
|
}
|
|
return temp;
|
|
}
|
|
constexpr int monomials(int n, int r)
|
|
{
|
|
int temp = 0;
|
|
for (int i = 0; i <= r; i++)
|
|
temp += comb(n, i);
|
|
return temp;
|
|
}
|
|
constexpr int N = 80;
|
|
constexpr int D = 4;
|
|
constexpr int SPARSE_D = 3;
|
|
#define FILENAME "HFE80.txt"
|
|
|
|
constexpr int M = monomials(N, D);
|
|
constexpr int SPARSE_M = monomials(N, SPARSE_D);
|
|
constexpr int reductors = 64;
|
|
extern int grevlex_interval[D + 1][N];
|
|
extern int grevlex_degree_interval[D + 1];
|
|
extern long long mult_count;
|
|
extern int** mult_res;
|
|
#define __PARALLEL 112
|
|
#endif
|