Created
June 24, 2025 20:44
-
-
Save Validark/24f22bd71581ee72b747584625360ec1 to your computer and use it in GitHub Desktop.
vp2intersect in zig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const builtin = @import("builtin"); | |
const IntersectResult = extern struct { mask1: @Vector(16, bool), mask2: @Vector(16, bool) }; | |
export fn vp2intersectd(a: @Vector(16, i32), b: @Vector(16, i32)) IntersectResult { | |
return struct { | |
extern fn @"llvm.x86.avx512.vp2intersect.d.512"(@Vector(16, i32), @Vector(16, i32)) callconv(.{ .x86_64_vectorcall = .{} }) IntersectResult; | |
}.@"llvm.x86.avx512.vp2intersect.d.512"(a, b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment