Skip to content

Commit 8ae4b14

Browse files
committed
++
1 parent 0eeecf5 commit 8ae4b14

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/build_win.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
run: | # /bin/link interferes with cl/link.exe
2828
bash -c "rm /bin/link"
2929
bash -c "curl -Lo mkn.exe https://github.com/mkn/mkn/releases/download/latest/mkn.exe"
30-
bash -c 'KLOG=3 ./mkn clean build test run -p test,b0,b1 -OtKda "-arch:AVX2 -std:c++20 -fPIC -DKUL_FORCE_TRACE" -l -pthread -g 0'
30+
bash -c 'KLOG=3 ./mkn clean build test run -p test,b0,b1 -OtKda "-arch:AVX2 -std:c++20 -DKUL_FORCE_TRACE" -g 0'

inc/mkn/avx/lazy.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ struct LazyEvaluator
260260
#include <cstdint>
261261
262262
template<typename E>
263-
using AVXVec = std::vector<E, mkn::kul::AlignedAllocator<E, 32>>;
263+
using AVXVec = std::vector<E, mkn::kul::AlignedAllocator<E, Options::ALIGN()>>;
264264
)";
265265

266266
std::string const funcheader = R"(
@@ -346,7 +346,7 @@ void exec(LazyVal_t const& t, T* const ret){
346346
std::vector<std::string> fn_strs{"add", "sub", "mul", "div"};
347347

348348
template<typename E>
349-
using AVXVec = std::vector<E, mkn::kul::AlignedAllocator<E, 32>>;
349+
using AVXVec = std::vector<E, mkn::kul::AlignedAllocator<E, Options::ALIGN()>>;
350350
static inline thread_local AVXVec<std::array<T, N>> tmps{};
351351
};
352352

test/test_lazy.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ constexpr static std::size_t N = 1e6 + 5;
88

99
void add()
1010
{
11-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
11+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
1212
DV a0(N, 1), a1(N, 2);
1313
auto [l0, l1] = lazy(a0, a1);
1414
auto r = eval(l0 + l1 + l0);
@@ -19,7 +19,7 @@ void add()
1919

2020
void mul()
2121
{
22-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
22+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
2323
DV a0(N, 1), a1(N, 2);
2424
auto [l0, l1] = lazy(a0, a1);
2525
auto r = eval(l0 * l1 * l0);
@@ -30,7 +30,7 @@ void mul()
3030
void fma3()
3131
{
3232
{
33-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
33+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
3434
DV a0(N, 1), a1(N, 2), a2(N, 3);
3535
auto [l0, l1, l2] = lazy(a0, a1, a2);
3636
auto lz = l0 * l1 + l2;
@@ -39,7 +39,7 @@ void fma3()
3939
assert(r.front() == 5 and r.back() == 5);
4040
}
4141
{
42-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
42+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
4343
DV a0(N, 1), a1(N, 2), a2(N, 3);
4444
auto [l0, l1, l2] = lazy(a0, a1, a2);
4545
auto lz = l0 + l1 * l2;
@@ -51,7 +51,7 @@ void fma3()
5151

5252
void fma0()
5353
{
54-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
54+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
5555
DV a0(N, 1), a1(N, 2), a2(N, 3);
5656
auto [l0, l1, l2] = lazy(a0, a1, a2);
5757
auto lz = l0 * l1 + l2 + l0;
@@ -62,7 +62,7 @@ void fma0()
6262

6363
void fma1()
6464
{
65-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
65+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
6666
DV a0(N, 1), a1(N, 2), a2(N, 3), a3(N, 4), a4(N, 5);
6767
auto [l0, l1, l2, l3, l4] = lazy(a0, a1, a2, a3, a4);
6868
auto r = eval(l0 * l1 + l2 * l3 + l4 * l1 + l2 * l3 + l4 * l1);
@@ -71,7 +71,7 @@ void fma1()
7171
}
7272
void fma2()
7373
{
74-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
74+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
7575
DV a0(N, 1), a1(N, 2), a2(N, 3), a3(N, 4), a4(N, 5), a5(N, 6);
7676
auto [l0, l1, l2, l3, l4, l5] = lazy(a0, a1, a2, a3, a4, a5);
7777
auto r = eval(l0 * l1 + l2 + l3 + l4 * l5);
@@ -84,7 +84,7 @@ void fma() {}
8484

8585
void fn0()
8686
{
87-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
87+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
8888
DV a0(N, 1), a1(N, 2), a2(N, 3), a3(N, 4), a4(N, 5);
8989
assert(a0.data() and a4.data());
9090
auto [l0, l1, l2, l3, l4] = lazy(a0, a1, a2, a3, a4);
@@ -96,7 +96,7 @@ void fn0()
9696

9797
void fn1()
9898
{
99-
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, 32>>;
99+
using DV = std::vector<double, mkn::kul::AlignedAllocator<double, Options::ALIGN()>>;
100100
DV a0(N, 1), a1(N, 2), a2(N, 3), a3(N, 4), a4(N, 5);
101101
assert(a0.data() and a4.data());
102102
auto [l0, l1, l2, l3, l4] = lazy(a0, a1, a2, a3, a4);

0 commit comments

Comments
 (0)