From 5320bbfb049cead563d7e1767efd171502d61b4a Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 7 Sep 2020 01:57:35 +0200 Subject: [PATCH] Added missing intrinsics overloads --- src/ComputeSharp.Core/Intrinsics/Hlsl.cs | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.cs b/src/ComputeSharp.Core/Intrinsics/Hlsl.cs index ef489415..e4740576 100644 --- a/src/ComputeSharp.Core/Intrinsics/Hlsl.cs +++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.cs @@ -1512,6 +1512,22 @@ namespace ComputeSharp [PreserveMemberName] public static void InterlockedExchange(uint destination, uint value, out uint original) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedExchange)}(uint,uint,uint)"); + /// + /// Performs a guaranteed atomic max. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedMax(int destination, int value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedMax)}(int,int)"); + + /// + /// Performs a guaranteed atomic max. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedMax(uint destination, uint value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedMax)}(uint,uint)"); + /// /// Performs a guaranteed atomic max. /// @@ -1530,6 +1546,22 @@ namespace ComputeSharp [PreserveMemberName] public static void InterlockedMax(uint destination, uint value, out uint original) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedMax)}(uint,uint,uint)"); + /// + /// Performs a guaranteed atomic min. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedMin(int destination, int value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedMin)}(int,int)"); + + /// + /// Performs a guaranteed atomic min. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedMin(uint destination, uint value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedMin)}(uint,uint)"); + /// /// Performs a guaranteed atomic min. /// @@ -1548,6 +1580,22 @@ namespace ComputeSharp [PreserveMemberName] public static void InterlockedMin(uint destination, uint value, out uint original) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedMin)}(uint,uint,uint)"); + /// + /// Performs a guaranteed atomic or. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedOr(int destination, int value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedOr)}(int,int)"); + + /// + /// Performs a guaranteed atomic or. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedOr(uint destination, uint value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedOr)}(uint,uint)"); + /// /// Performs a guaranteed atomic or. /// @@ -1566,6 +1614,22 @@ namespace ComputeSharp [PreserveMemberName] public static void InterlockedOr(uint destination, uint value, out uint original) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedOr)}(uint,uint,uint)"); + /// + /// Performs a guaranteed atomic xor. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedXor(int destination, int value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedXor)}(int,int)"); + + /// + /// Performs a guaranteed atomic xor. + /// + /// The destination value. + /// The input value. + [PreserveMemberName] + public static void InterlockedXor(uint destination, uint value) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(InterlockedXor)}(uint,uint)"); + /// /// Performs a guaranteed atomic xor. ///