Closed eleven-pixel closed 1 year ago
static inline mont_t dot_product(const mont_t a[], const mont_t b, size_t len, size_t stride_b = 1) { mont_t tmp; wide_t even; uint32_t odd[2n-2], carry;
for (size_t i = 0; i < 2*n-2; i++)
even[i] = odd[i] = 0;
even[i] = even[i+1] = 0;
missing brace here?
Oops! Got carried away yesterday. Fixed. Thanks!
missing brace here?
No, single-expression loop body doesn't require braces.
deps/sppark/ff/mont_t.cuh(729): error: expected a ">" for (i = 0; i < n; i += 2) { ^
deps/sppark/ff/mont_t.cuh(735): error: expression must be a modifiable lvalue : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(735): error: an asm operand must have scalar type : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: expression must be a modifiable lvalue : "+r"(even[n+i+1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: an asm operand must have scalar type : "+r"(even[n+i+1]), "+r"(carry)); ^
6 errors detected in the compilation of "pc2/cuda/pc2.cu". deps/sppark/ff/mont_t.cuh(721): error: identifier "i" is undefined even[i] = even[i+1] = 0; ^
deps/sppark/ff/mont_t.cuh(729): error: expected a ">" for (i = 0; i < n; i += 2) { ^
deps/sppark/ff/mont_t.cuh(735): error: expression must be a modifiable lvalue : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(735): error: an asm operand must have scalar type : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: expression must be a modifiable lvalue : "+r"(even[n+i+1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: an asm operand must have scalar type : "+r"(even[n+i+1]), "+r"(carry)); ^
6 errors detected in the compilation of "pc2/cuda/pc2.cu". deps/sppark/ff/mont_t.cuh(721): error: identifier "i" is undefined even[i] = even[i+1] = 0; ^
deps/sppark/ff/mont_t.cuh(729): error: expected a ">" for (i = 0; i < n; i += 2) { ^
deps/sppark/ff/mont_t.cuh(735): error: expression must be a modifiable lvalue : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(735): error: an asm operand must have scalar type : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: expression must be a modifiable lvalue : "+r"(even[n+i+1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: an asm operand must have scalar type : "+r"(even[n+i+1]), "+r"(carry)); ^
6 errors detected in the compilation of "pc2/cuda/pc2.cu". deps/sppark/ff/mont_t.cuh(721): error: identifier "i" is undefined even[i] = even[i+1] = 0; ^
deps/sppark/ff/mont_t.cuh(729): error: expected a ">" for (i = 0; i < n; i += 2) { ^
deps/sppark/ff/mont_t.cuh(735): error: expression must be a modifiable lvalue : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(735): error: an asm operand must have scalar type : "+r"(odd[n+i-1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: expression must be a modifiable lvalue : "+r"(even[n+i+1]), "+r"(carry)); ^
deps/sppark/ff/mont_t.cuh(742): error: an asm operand must have scalar type : "+r"(even[n+i+1]), "+r"(carry)); ^
6 errors detected in the compilation of "pc2/cuda/pc2.cu".