Skip to content

Commit 3a66965

Browse files
committed
feat: Derive more for various BasicSnippets
changelog: ignore
1 parent 42426e3 commit 3a66965

24 files changed

+25
-2
lines changed

tasm-lib/src/arithmetic/i128/lt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use crate::prelude::*;
2323
/// # Panics
2424
///
2525
/// - If preconditions are not met.
26+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
2627
pub struct Lt;
2728

2829
impl BasicSnippet for Lt {

tasm-lib/src/arithmetic/i128/shift_right.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use crate::prelude::*;
3030
/// - If preconditions are not met.
3131
///
3232
/// [shr]: core::ops::Shr
33+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
3334
pub struct ShiftRight;
3435

3536
impl ShiftRight {

tasm-lib/src/arithmetic/u128/lt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use crate::prelude::*;
1111
/// BEFORE: _ [rhs; 4] [lhs; 4]
1212
/// AFTER: _ (lhs < rhs)
1313
/// ```
14+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
1415
pub struct Lt;
1516

1617
impl BasicSnippet for Lt {

tasm-lib/src/arithmetic/xfe/cube.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use triton_vm::prelude::*;
22

33
use crate::prelude::*;
44

5+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
56
pub struct Cube;
67

78
impl BasicSnippet for Cube {

tasm-lib/src/arithmetic/xfe/square.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use triton_vm::prelude::*;
22

33
use crate::prelude::*;
44

5+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
56
pub struct Square;
67

78
impl BasicSnippet for Square {

tasm-lib/src/arithmetic/xfe/to_the_fourth.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use crate::traits::basic_snippet::SignOffFingerprint;
2121
/// ### Postconditions
2222
///
2323
/// - the result is the argument raised to the fourth power
24+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
2425
pub struct ToTheFourth;
2526

2627
impl BasicSnippet for ToTheFourth {

tasm-lib/src/arithmetic/xfe/to_the_power_of_power_of_2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use triton_vm::prelude::*;
22

33
use crate::prelude::*;
44

5+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
56
pub struct ToThePowerOfPowerOf2;
67

78
impl BasicSnippet for ToThePowerOfPowerOf2 {

tasm-lib/src/array/horner_evaluation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use crate::prelude::*;
1111
/// polynomial in that point. It can be used for univariate batching, whereby
1212
/// the object is to compute a random linear sum of a given set of points, and
1313
/// the weights are given by the powers of one challenge.
14+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
1415
pub struct HornerEvaluation {
1516
pub num_coefficients: usize,
1617
}

tasm-lib/src/array/inner_product_of_three_rows_with_weights.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use triton_vm::table::master_table::MasterTable;
88
use crate::data_type::ArrayType;
99
use crate::prelude::*;
1010

11-
#[derive(Debug, Clone, Copy, Display, Arbitrary)]
11+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Display, Arbitrary)]
1212
pub enum MainElementType {
1313
Bfe,
1414
Xfe,
@@ -29,6 +29,7 @@ impl From<MainElementType> for DataType {
2929
/// Calculate inner product of both main columns and auxiliary columns with weights. Returns one
3030
/// scalar in the form of an auxiliary-field element. Main column can be either a base field
3131
/// element, or an auxiliary-field element.
32+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
3233
pub struct InnerProductOfThreeRowsWithWeights {
3334
main_length: usize,
3435
main_element_type: MainElementType,

tasm-lib/src/array/inner_product_of_xfes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use triton_vm::prelude::*;
33
use crate::data_type::ArrayType;
44
use crate::prelude::*;
55

6+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
67
pub struct InnerProductOfXfes {
78
pub length: usize,
89
}

0 commit comments

Comments
 (0)