@@ -102,40 +102,56 @@ Sketch* Construct(int bits, int impl)
102
102
default :
103
103
return nullptr ;
104
104
}
105
+ break ;
105
106
#ifdef HAVE_CLMUL
106
107
case FieldImpl::CLMUL:
107
- case FieldImpl::CLMUL_TRI: {
108
108
if (EnableClmul ()) {
109
109
switch ((bits + 7 ) / 8 ) {
110
110
case 1 :
111
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul1Byte (bits, impl);
112
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri1Byte (bits, impl);
111
+ return ConstructClMul1Byte (bits, impl);
113
112
case 2 :
114
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul2Bytes (bits, impl);
115
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri2Bytes (bits, impl);
113
+ return ConstructClMul2Bytes (bits, impl);
116
114
case 3 :
117
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul3Bytes (bits, impl);
118
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri3Bytes (bits, impl);
115
+ return ConstructClMul3Bytes (bits, impl);
119
116
case 4 :
120
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul4Bytes (bits, impl);
121
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri4Bytes (bits, impl);
117
+ return ConstructClMul4Bytes (bits, impl);
122
118
case 5 :
123
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul5Bytes (bits, impl);
124
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri5Bytes (bits, impl);
119
+ return ConstructClMul5Bytes (bits, impl);
125
120
case 6 :
126
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul6Bytes (bits, impl);
127
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri6Bytes (bits, impl);
121
+ return ConstructClMul6Bytes (bits, impl);
128
122
case 7 :
129
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul7Bytes (bits, impl);
130
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri7Bytes (bits, impl);
123
+ return ConstructClMul7Bytes (bits, impl);
131
124
case 8 :
132
- if (FieldImpl (impl) == FieldImpl::CLMUL) return ConstructClMul8Bytes (bits, impl);
133
- if (FieldImpl (impl) == FieldImpl::CLMUL_TRI) return ConstructClMulTri8Bytes (bits, impl);
125
+ return ConstructClMul8Bytes (bits, impl);
134
126
default :
135
127
return nullptr ;
136
128
}
137
129
}
138
- }
130
+ break ;
131
+ case FieldImpl::CLMUL_TRI:
132
+ if (EnableClmul ()) {
133
+ switch ((bits + 7 ) / 8 ) {
134
+ case 1 :
135
+ return ConstructClMulTri1Byte (bits, impl);
136
+ case 2 :
137
+ return ConstructClMulTri2Bytes (bits, impl);
138
+ case 3 :
139
+ return ConstructClMulTri3Bytes (bits, impl);
140
+ case 4 :
141
+ return ConstructClMulTri4Bytes (bits, impl);
142
+ case 5 :
143
+ return ConstructClMulTri5Bytes (bits, impl);
144
+ case 6 :
145
+ return ConstructClMulTri6Bytes (bits, impl);
146
+ case 7 :
147
+ return ConstructClMulTri7Bytes (bits, impl);
148
+ case 8 :
149
+ return ConstructClMulTri8Bytes (bits, impl);
150
+ default :
151
+ return nullptr ;
152
+ }
153
+ }
154
+ break ;
139
155
#endif
140
156
}
141
157
return nullptr ;
0 commit comments