"UnsignedInteger64" (编译类型)
"UnsignedInteger64"
表示一个无符号的 64 位机器整数原子类型说明符.
更多信息
- "UnsignedInteger64" 可用于 Typed 和相关架构以指定一种类型.
范例
基本范例 (3)
"UnsignedInteger64" 可用作 CompiledCodeFunction 的输入和输出:
cf = FunctionCompile[Function[Typed[arg, "UnsignedInteger64"], arg]]cf[ 100]在运行函数时,溢出会导致错误. 计算中止,消息发送,并使用 Wolfram Engine 来计算结果:
cf = FunctionCompile[Function[Typed[arg, "UnsignedInteger64"], arg ^ arg]];
cf[2^4]"UnsignedInteger64" 参数在与实数结合时会自动提升:
cf = FunctionCompile[Function[{Typed[arg1, "UnsignedInteger64"], Typed[arg2, "Real64"]}, arg1 + arg2]];
Information[cf, "Signature"]"UnsignedInteger64" 在与较小存储范围的整数结合时,较小的类型会自动提升:
cf = FunctionCompile[Function[{Typed[arg1, "UnsignedInteger64"], Typed[arg2, "Integer8"]}, arg1 + arg2]];
Information[cf, "Signature"]有符号的相同存储范围的整数在与 "UnsignedInteger64" 结合时会自动提升:
cf = FunctionCompile[Function[{Typed[arg1, "Integer64"], Typed[arg2, "UnsignedInteger64"]}, arg1 + arg2]];
Information[cf, "Signature"]技术笔记
历史
2019年引入 (12.0)