Skip to content

Commit be9fb12

Browse files
committed
Fixes
1 parent b384158 commit be9fb12

File tree

13 files changed

+28
-17
lines changed

13 files changed

+28
-17
lines changed

cp-algo/linalg/matrix.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#ifndef CP_ALGO_LINALG_MATRIX_HPP
22
#define CP_ALGO_LINALG_MATRIX_HPP
3-
#pragma GCC push_options
4-
#pragma GCC target("avx2")
53
#include "../random/rng.hpp"
64
#include "../math/common.hpp"
75
#include "vector.hpp"
@@ -10,6 +8,8 @@
108
#include <cassert>
119
#include <vector>
1210
#include <array>
11+
#pragma GCC push_options
12+
#pragma GCC target("avx2")
1313
namespace cp_algo::linalg {
1414
enum gauss_mode {normal, reverse};
1515

cp-algo/linalg/vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#ifndef CP_ALGO_LINALG_VECTOR_HPP
22
#define CP_ALGO_LINALG_VECTOR_HPP
3-
#pragma GCC push_options
4-
#pragma GCC target("avx2")
53
#include "../random/rng.hpp"
64
#include "../number_theory/modint.hpp"
75
#include "../util/big_alloc.hpp"
@@ -14,6 +12,8 @@
1412
#include <iterator>
1513
#include <cassert>
1614
#include <ranges>
15+
#pragma GCC push_options
16+
#pragma GCC target("avx2")
1717
namespace cp_algo::linalg {
1818
template<typename base, class Alloc = big_alloc<base>>
1919
struct vec: std::basic_string<base, std::char_traits<base>, Alloc> {

cp-algo/math/cvector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef CP_ALGO_MATH_CVECTOR_HPP
22
#define CP_ALGO_MATH_CVECTOR_HPP
3-
#pragma GCC push_options
4-
#pragma GCC target("avx2")
53
#include "../util/simd.hpp"
64
#include "../util/complex.hpp"
75
#include "../util/checkpoint.hpp"
86
#include "../util/big_alloc.hpp"
97
#include <ranges>
108
#include <bit>
9+
#pragma GCC push_options
10+
#pragma GCC target("avx2")
1111

1212
namespace stdx = std::experimental;
1313
namespace cp_algo::math::fft {

cp-algo/math/factorials.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef CP_ALGO_MATH_FACTORIALS_HPP
22
#define CP_ALGO_MATH_FACTORIALS_HPP
3-
#pragma GCC push_options
4-
#pragma GCC target("avx2")
53
#include "../util/checkpoint.hpp"
64
#include "../util/bump_alloc.hpp"
75
#include "../util/simd.hpp"
86
#include "../math/combinatorics.hpp"
97
#include "../number_theory/modint.hpp"
108
#include <ranges>
9+
#pragma GCC push_options
10+
#pragma GCC target("avx2")
1111

1212
namespace cp_algo::math {
1313
template<bool use_bump_alloc = false, int maxn = -1>

cp-algo/math/fft.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef CP_ALGO_MATH_FFT_HPP
22
#define CP_ALGO_MATH_FFT_HPP
3-
#pragma GCC push_options
4-
#pragma GCC target("avx2")
53
#include "../number_theory/modint.hpp"
64
#include "../util/checkpoint.hpp"
75
#include "../random/rng.hpp"
86
#include "cvector.hpp"
97
#include <iostream>
108
#include <ranges>
9+
#pragma GCC push_options
10+
#pragma GCC target("avx2")
1111
namespace cp_algo::math::fft {
1212
template<modint_type base>
1313
struct dft {

cp-algo/math/fft64.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef CP_ALGO_MATH_FFT64_HPP
22
#define CP_ALGO_MATH_FFT64_HPP
3-
#pragma GCC push_options
4-
#pragma GCC target("avx2")
53
#include "../random/rng.hpp"
64
#include "../math/common.hpp"
75
#include "../math/cvector.hpp"
6+
#pragma GCC push_options
7+
#pragma GCC target("avx2")
88

99
namespace cp_algo::math::fft {
1010
struct dft64 {

cp-algo/math/multivar.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef CP_ALGO_MATH_MULTIVAR_HPP
22
#define CP_ALGO_MATH_MULTIVAR_HPP
3-
#pragma GCC push_options
4-
#pragma GCC target("avx2")
53
#include "../util/big_alloc.hpp"
64
#include "../number_theory/modint.hpp"
75
#include "../math/fft.hpp"
6+
#pragma GCC push_options
7+
#pragma GCC target("avx2")
88
namespace cp_algo::math::fft {
99
template<modint_type base>
1010
struct multivar {

cp-algo/math/poly.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <utility>
1313
#include <vector>
1414
#include <list>
15+
#pragma GCC push_options
16+
#pragma GCC target("avx2")
1517
namespace cp_algo::math {
1618
template<typename T>
1719
struct poly_t {
@@ -745,4 +747,5 @@ namespace cp_algo::math {
745747
return b * a;
746748
}
747749
};
750+
#pragma GCC pop_options
748751
#endif // CP_ALGO_MATH_POLY_HPP

cp-algo/math/poly/impl/div.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "../../fft.hpp"
44
#include "../../common.hpp"
55
#include <cassert>
6+
#pragma GCC push_options
7+
#pragma GCC target("avx2")
68
// operations related to polynomial division
79
namespace cp_algo::math::poly::impl {
810
auto divmod_slow(auto const& p, auto const& q) {
@@ -137,4 +139,5 @@ namespace cp_algo::math::poly::impl {
137139
return p;
138140
}
139141
}
142+
#pragma GCC pop_options
140143
#endif // CP_ALGO_MATH_POLY_IMPL_DIV_HPP

cp-algo/math/poly/impl/euclid.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <vector>
1010
#include <tuple>
1111
#include <list>
12+
#pragma GCC push_options
13+
#pragma GCC target("avx2")
1214
// operations related to gcd and Euclidean algo
1315
namespace cp_algo::math::poly::impl {
1416
template<typename poly>
@@ -99,4 +101,5 @@ namespace cp_algo::math::poly::impl {
99101
return Tr.b / q[0];
100102
}
101103
}
104+
#pragma GCC pop_options
102105
#endif // CP_ALGO_MATH_POLY_IMPL_EUCLID_HPP

0 commit comments

Comments
 (0)