Browse Source

Remove the hardware acceleration check in the `pointwiseAccRef`.

The AVX2 code provides it's own pointwiseAcc routine, so this is no
longer needed.

Part of #1.
Yawning Angel 2 years ago
parent
commit
2233aa6bb2
1 changed files with 1 additions and 11 deletions
  1. 1 11
      polyvec.go

+ 1 - 11
polyvec.go

@@ -110,16 +110,6 @@ func pointwiseAccRef(p *poly, a, b *polyVec) {
 			p.coeffs[j] += montgomeryReduce(uint32(a.vec[i].coeffs[j]) * uint32(t))
 		}
 
-		// The AVX2 inverse-NTT implementation (and possibly others in the
-		// future) require fully reduced inputs, while the reference code
-		// does not.
-		//
-		// Do the right thing based on the current implementation.  Eventually
-		// the AVX2 code will have it's own implementation(s) of this routine.
-		if isHardwareAccelerated {
-			p.coeffs[j] = freeze(p.coeffs[j])
-		} else {
-			p.coeffs[j] = barrettReduce(p.coeffs[j])
-		}
+		p.coeffs[j] = barrettReduce(p.coeffs[j])
 	}
 }