diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-10-04 18:23:52 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-05 04:51:45 -0400 |
| commit | 22b5e47839cf34c1e4a7c5e6dc256e041b4bf8fc (patch) | |
| tree | a940511e3d881231d60276f824a6a9055877dc83 /lib/std/builtin.zig | |
| parent | 7c5a24e08cd0bffd2a5cce6d1fd592a7d2bee678 (diff) | |
| download | zig-22b5e47839cf34c1e4a7c5e6dc256e041b4bf8fc.tar.gz zig-22b5e47839cf34c1e4a7c5e6dc256e041b4bf8fc.zip | |
stage1: Implement @reduce builtin for vector types
The builtin folds a Vector(N,T) into a scalar T using a specified
operator.
Closes #2698
Diffstat (limited to 'lib/std/builtin.zig')
| -rw-r--r-- | lib/std/builtin.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 92fa78bc39..68bbbe3b2d 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -100,6 +100,16 @@ pub const AtomicOrder = enum { /// This data structure is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. +pub const ReduceOp = enum { + And, + Or, + Xor, + Min, + Max, +}; + +/// This data structure is used by the Zig language code generation and +/// therefore must be kept in sync with the compiler implementation. pub const AtomicRmwOp = enum { Xchg, Add, |
