Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 456e260

Browse files
authored
fix c_extension code
1 parent a0955ef commit 456e260

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

advanced_source/c_extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ffi utils will make sure a compiler can find them during the build.
2727
if (!THFloatTensor_isSameSizeAs(input1, input2))
2828
return 0;
2929
THFloatTensor_resizeAs(output, input1);
30-
THFloatTensor_add(output, input1, input2);
30+
THFloatTensor_cadd(output, input1, 1.0, input2);
3131
return 1;
3232
}
3333

0 commit comments

Comments
 (0)