Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature-gate the modules #79

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Get rid of crate and $crate
qryxip committed Oct 25, 2020

Verified

This commit was signed with the committer’s verified signature.
qryxip Ryo Yamashita
commit 8e5e8e98bd0bb52870d22217709a4301a4dc4642
8 changes: 4 additions & 4 deletions src/convolution.rs
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@ macro_rules! modulus {
const VALUE: u32 = $name as _;
const HINT_VALUE_IS_PRIME: bool = true;

fn butterfly_cache() -> &'static ::std::thread::LocalKey<::std::cell::RefCell<::std::option::Option<$crate::modint::ButterflyCache<Self>>>> {
fn butterfly_cache() -> &'static ::std::thread::LocalKey<::std::cell::RefCell<::std::option::Option<self::modint::ButterflyCache<Self>>>> {
thread_local! {
static BUTTERFLY_CACHE: ::std::cell::RefCell<::std::option::Option<$crate::modint::ButterflyCache<$name>>> = ::std::default::Default::default();
static BUTTERFLY_CACHE: ::std::cell::RefCell<::std::option::Option<self::modint::ButterflyCache<$name>>> = ::std::default::Default::default();
}
&BUTTERFLY_CACHE
}
@@ -21,7 +21,7 @@ macro_rules! modulus {

use super::{
internal_bit, internal_math,
modint::{ButterflyCache, Modulus, RemEuclidU32, StaticModInt},
modint::{self, ButterflyCache, Modulus, RemEuclidU32, StaticModInt},
};
use std::{
cmp,
@@ -232,7 +232,7 @@ fn prepare<M: Modulus>() -> ButterflyCache<M> {

#[cfg(test)]
mod tests {
use super::super::modint::{Mod998244353, Modulus, RemEuclidU32, StaticModInt};
use super::super::modint::{self, Mod998244353, Modulus, RemEuclidU32, StaticModInt};
use rand::{rngs::ThreadRng, Rng as _};
use std::{
convert::{TryFrom, TryInto as _},
2 changes: 1 addition & 1 deletion src/lazysegtree.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::internal_bit::ceil_pow2;
use super::Monoid;
use super::segtree::Monoid;

pub trait MapMonoid {
type M: Monoid;