Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita03e963

Browse files
committed
demand maxn if use_bump_alloc is true
1 parentbc21b44 commita03e963

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎cp-algo/math/factorials.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
#include<ranges>
99

1010
namespacecp_algo::math {
11-
template<bool use_bump_alloc =false,int maxn =100'000>
11+
template<bool use_bump_alloc =false,int maxn =-1>
1212
autofacts(autoconst& args) {
13+
static_assert(!use_bump_alloc || maxn >0,"maxn must be set if use_bump_alloc is true");
1314
constexprint max_mod =1'000'000'000;
1415
constexprint accum =4;
1516
constexprint simd_size =8;

‎verify/simd/many_facts.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void solve() {
1515
vector<base>args(n);
1616
for(auto &x : args) {cin >> x;}
1717
cp_algo::checkpoint("read");
18-
auto res =facts(args);
18+
auto res = facts<true,100'000>(args);
1919
for(auto it: res) {cout << it <<"\n";}
2020
cp_algo::checkpoint("write");
2121
cp_algo::checkpoint<1>();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp