Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliiH authored and VitaliiH committed Nov 22, 2024
1 parent 91ae2b3 commit 30462c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions wrappers/rust/icicle-core/src/ntt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub enum NTTDir {
/// - kMN: inputs are digit-reversed-order (=mixed) and outputs are natural-order.
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd)]
pub enum Ordering {
kNN,
kNR,
Expand Down Expand Up @@ -451,8 +451,8 @@ macro_rules! impl_ntt_bench {
let min_log2 = get_env_log2("MIN_LOG2", min_log2_default);
let max_log2 = get_env_log2("MAX_LOG2", max_log2_default);

assert!(min_log2 >= min_log2_default);
assert!(min_log2 < max_log2);
assert!(min_log2 >= min_log2_default, "MIN_LOG2 must be >= {}", min_log2_default);
assert!(min_log2 < max_log2, "MAX_LOG2 must be > MIN_LOG2");

(min_log2, max_log2)
}
Expand Down
3 changes: 2 additions & 1 deletion wrappers/rust/icicle-core/src/ntt/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ where
config.ordering = ordering;
let mut batch_ntt_result = vec![F::zero(); batch_size * test_size];
for alg in [NttAlgorithm::Radix2, NttAlgorithm::MixedRadix] {
if alg == NttAlgorithm::Radix2 && ordering as u32 > 3 {
if alg == NttAlgorithm::Radix2 && (ordering > Ordering::kRR) {
// Radix2 does not support kNM and kMN ordering
continue;
}
config.batch_size = batch_size as i32;
Expand Down

0 comments on commit 30462c6

Please sign in to comment.