mirror of
https://github.com/ziglang/zig.git
synced 2025-12-29 17:43:17 +00:00
Type.zig: Add nvcl/cuda CType definitions
This commit is contained in:
parent
f0e66ac4d0
commit
94945864b9
14
src/type.zig
14
src/type.zig
@ -6862,6 +6862,18 @@ pub const CType = enum {
|
||||
},
|
||||
},
|
||||
|
||||
.nvcl, .cuda => switch (self) {
|
||||
.short, .ushort => return 16,
|
||||
.int, .uint, .float => return 32,
|
||||
.long, .ulong => switch (target.cpu.arch) {
|
||||
.nvptx => return 32,
|
||||
.nvptx64 => return 64,
|
||||
else => return 64,
|
||||
},
|
||||
.longlong, .ulonglong, .double => return 64,
|
||||
.longdouble => return 64,
|
||||
},
|
||||
|
||||
.amdhsa, .amdpal => switch (self) {
|
||||
.short, .ushort => return 16,
|
||||
.int, .uint, .float => return 32,
|
||||
@ -6876,8 +6888,6 @@ pub const CType = enum {
|
||||
.rtems,
|
||||
.nacl,
|
||||
.aix,
|
||||
.cuda,
|
||||
.nvcl,
|
||||
.ps4,
|
||||
.ps5,
|
||||
.elfiamcu,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user