微软最近发布了他们的ARM64构建工具作为visualstudio15.9的一部分。我要完成到ARM64的端口。我的多项式乘法有问题。
我遇到的问题是,微软没有提供预期的数据类型,比如
poly64_t
或者像
vreinterpretq_u64_p128
arm64_neon.h
在GitHub上。
无法编译:
#include <arm64_neon.h>
poly128_t VMULL_P64(const poly64_t a, const poly64_t b)
{
return vmull_p64(a, b);
}
结果是:
test.cxx(2): error C4430: missing type specifier - int assumed. Note: C++ does n
ot support default-int
test.cxx(2): error C2146: syntax error: missing ';' before identifier 'VMULL_P64
'
test.cxx(3): error C2143: syntax error: missing ';' before '{'
test.cxx(3): error C2447: '{': missing function header (old-style formal list?)
这也无法编译:
#include <arm64_neon.h>
uint64x2_t VMULL_P64(const uint64_t a, const uint64_t b)
{
return vmull_p64(a, b);
}
以及:
test.cxx(4): error C2664: '__n128 neon_pmull_64(__n64,__n64)': cannot convert ar
gument 1 from 'const uint64_t' to '__n64'
test.cxx(4): note: No constructor could take the source type, or constructor ove
rload resolution was ambiguous
我把这个拼凑在一起,但似乎不对。尤其是中间产物
__n64
(我无法用一个语句编译它):
#include <arm64_neon.h>
uint64x2_t VMULL_P64(const uint64_t a, const uint64_t b)
{
__n64 x = {a}, y = {b};
return vmull_p64(x, y);
}
其他的东西,如CRC32,CRC32C,AES,SHA-1和SHA-256除外。
微软打算如何使用ARM64来执行多项式乘法?
<arm64_neon.h>
从哪里来?手臂很清晰头部
<arm_acle.h>
.)
ARM在
ARM C Language Extensions 2.1 (ACLE)
poly128_t vmull_p64 (poly64_t, poly64_t);
对双字低位执行加宽多项式乘法。
在ARMv8 AArch32和AArch64上提供。
poly128_t vmull_high_p64 (poly64x2_t, poly64x2_t);
对双字高位执行加宽多项式乘法。