@@ -1062,10 +1062,7 @@ macro_rules! op_mle3_range {
10621062 let $bb_out = $op;
10631063 $op_bb_out
10641064 } } ;
1065- }
10661065
1067- #[ macro_export]
1068- macro_rules! op_mle3_range_pool {
10691066 ( $x: ident, $a: ident, $b: ident, $res: ident, $x_vec: ident, $a_vec: ident, $b_vec: ident, $res_vec: ident, $op: expr, |$bb_out: ident| $op_bb_out: expr) => { {
10701067 let $x = if let Some ( ( start, offset) ) = $x. evaluations_range( ) {
10711068 & $x_vec[ start..] [ ..offset]
@@ -1091,7 +1088,7 @@ macro_rules! op_mle3_range_pool {
10911088
10921089/// deal with x * a + b
10931090#[ macro_export]
1094- macro_rules! op_mle_xa_b_pool {
1091+ macro_rules! op_mle_xa_b {
10951092 ( |$x: ident, $a: ident, $b: ident, $res: ident| $op: expr, $pool_e: ident, $pool_b: ident, |$bb_out: ident| $op_bb_out: expr) => {
10961093 match ( & $x. evaluations( ) , & $a. evaluations( ) , & $b. evaluations( ) ) {
10971094 (
@@ -1100,7 +1097,7 @@ macro_rules! op_mle_xa_b_pool {
11001097 $crate:: mle:: FieldType :: Base ( b_vec) ,
11011098 ) => {
11021099 let res_vec = $pool_b. borrow( ) ;
1103- op_mle3_range_pool !(
1100+ op_mle3_range !(
11041101 $x,
11051102 $a,
11061103 $b,
@@ -1119,7 +1116,7 @@ macro_rules! op_mle_xa_b_pool {
11191116 $crate:: mle:: FieldType :: Base ( b_vec) ,
11201117 ) => {
11211118 let res_vec = $pool_e. borrow( ) ;
1122- op_mle3_range_pool !(
1119+ op_mle3_range !(
11231120 $x,
11241121 $a,
11251122 $b,
@@ -1138,7 +1135,7 @@ macro_rules! op_mle_xa_b_pool {
11381135 $crate:: mle:: FieldType :: Ext ( b_vec) ,
11391136 ) => {
11401137 let res_vec = $pool_e. borrow( ) ;
1141- op_mle3_range_pool !(
1138+ op_mle3_range !(
11421139 $x,
11431140 $a,
11441141 $b,
@@ -1160,7 +1157,7 @@ macro_rules! op_mle_xa_b_pool {
11601157 }
11611158 } ;
11621159 ( |$x: ident, $a: ident, $b: ident, $res: ident| $op: expr, $pool_e: ident, $pool_b: ident) => {
1163- op_mle_xa_b_pool !( |$x, $a, $b, $res| $op, $pool_e, $pool_b, |out| out)
1160+ op_mle_xa_b !( |$x, $a, $b, $res| $op, $pool_e, $pool_b, |out| out)
11641161 } ;
11651162}
11661163
@@ -1297,15 +1294,6 @@ macro_rules! commutative_op_mle_pair {
12971294 _ => unreachable!( ) ,
12981295 }
12991296 } ;
1300- ( |$a: ident, $b: ident| $op: expr) => {
1301- commutative_op_mle_pair!( |$a, $b| $op, |out| out)
1302- } ;
1303- }
1304-
1305- /// macro support op(a, b) and tackles type matching internally.
1306- /// Please noted that op must satisfy commutative rule w.r.t op(b, a) operand swap.
1307- #[ macro_export]
1308- macro_rules! commutative_op_mle_pair_pool {
13091297 ( |$first: ident, $second: ident, $res: ident| $op: expr, $pool_e: ident, $pool_b: ident, |$bb_out: ident| $op_bb_out: expr) => {
13101298 match ( & $first. evaluations( ) , & $second. evaluations( ) ) {
13111299 ( $crate:: mle:: FieldType :: Base ( base1) , $crate:: mle:: FieldType :: Base ( base2) ) => {
@@ -1374,6 +1362,9 @@ macro_rules! commutative_op_mle_pair_pool {
13741362 }
13751363 } ;
13761364 ( |$a: ident, $b: ident, $res: ident| $op: expr, $pool_e: ident, $pool_b: ident) => {
1377- commutative_op_mle_pair_pool!( |$a, $b, $res| $op, $pool_e, $pool_b, |out| out)
1365+ commutative_op_mle_pair!( |$a, $b, $res| $op, $pool_e, $pool_b, |out| out)
1366+ } ;
1367+ ( |$a: ident, $b: ident| $op: expr) => {
1368+ commutative_op_mle_pair!( |$a, $b| $op, |out| out)
13781369 } ;
13791370}
0 commit comments