C# Class Hlsl, ComputeSharp

A that maps the supported HLSL intrinsic functions that can be used in compute shaders.
Datei anzeigen Open project: Sergio0694/ComputeSharp Class Usage Examples

Public Methods

Method Description
AllMemoryBarrier ( ) : void

Blocks execution of all threads in a group until all memory accesses have been completed.

A memory barrier guarantees that outstanding memory operations have completed. Threads are synchronized at GroupSync barriers. This may stall a thread or threads if memory operations are in progress.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

AllMemoryBarrierWithGroupSync ( ) : void

Blocks execution of all threads in a group until all memory accesses have been completed and all threads in the group have reached this call.

A memory barrier guarantees that outstanding memory operations have completed. Threads are synchronized at GroupSync barriers. This may stall a thread or threads if memory operations are in progress.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

DeviceMemoryBarrier ( ) : void

Blocks execution of all threads in a group until all device memory accesses have been completed.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

DeviceMemoryBarrierWithGroupSync ( ) : void

Blocks execution of all threads in a group until all device memory accesses have been completed and all threads in the group have reached this call.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

GroupMemoryBarrier ( ) : void

Blocks execution of all threads in a group until all group shared accesses have been completed.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

GroupMemoryBarrierWithGroupSync ( ) : void

Blocks execution of all threads in a group until all group shared accesses have been completed and all threads in the group have reached this call.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAdd ( int destination, int value ) : void

Performs a guaranteed atomic add of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAdd ( int destination, int value, int &original ) : void

Performs a guaranteed atomic add of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAdd ( uint destination, uint value ) : void

Performs a guaranteed atomic add of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAdd ( uint destination, uint value, uint &original ) : void

Performs a guaranteed atomic add of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAnd ( int destination, int value ) : void

Performs a guaranteed atomic and of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAnd ( int destination, int value, int &original ) : void

Performs a guaranteed atomic and of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAnd ( uint destination, uint value ) : void

Performs a guaranteed atomic and of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedAnd ( uint destination, uint value, uint &original ) : void

Performs a guaranteed atomic and of a value to a destination.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedCompareExchange ( int destination, int comparison, int value, int &original ) : void

Atomically compares the destination with the comparison value. If they are identical, the destination is overwritten with the input value. The original value is set to the destination's original value.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedCompareExchange ( uint destination, uint comparison, uint value, uint &original ) : void

Atomically compares the destination with the comparison value. If they are identical, the destination is overwritten with the input value. The original value is set to the destination's original value.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedCompareStore ( int destination, int comparison, int value ) : void

Atomically compares the destination to the comparison value. If they are identical, the destination is overwritten with the input value.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedCompareStore ( uint destination, uint comparison, uint value ) : void

Atomically compares the destination to the comparison value. If they are identical, the destination is overwritten with the input value.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedExchange ( int destination, int value, int &original ) : void

Assigns value to dest and returns the original value.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedExchange ( uint destination, uint value, uint &original ) : void

Assigns value to dest and returns the original value.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMax ( int destination, int value ) : void

Performs a guaranteed atomic max.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMax ( int destination, int value, int &original ) : void

Performs a guaranteed atomic max.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMax ( uint destination, uint value ) : void

Performs a guaranteed atomic max.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMax ( uint destination, uint value, uint &original ) : void

Performs a guaranteed atomic max.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMin ( int destination, int value ) : void

Performs a guaranteed atomic min.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMin ( int destination, int value, int &original ) : void

Performs a guaranteed atomic min.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMin ( uint destination, uint value ) : void

Performs a guaranteed atomic min.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedMin ( uint destination, uint value, uint &original ) : void

Performs a guaranteed atomic min.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedOr ( int destination, int value ) : void

Performs a guaranteed atomic or.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedOr ( int destination, int value, int &original ) : void

Performs a guaranteed atomic or.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedOr ( uint destination, uint value ) : void

Performs a guaranteed atomic or.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedOr ( uint destination, uint value, uint &original ) : void

Performs a guaranteed atomic or.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedXor ( int destination, int value ) : void

Performs a guaranteed atomic xor.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedXor ( int destination, int value, int &original ) : void

Performs a guaranteed atomic xor.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedXor ( uint destination, uint value ) : void

Performs a guaranteed atomic xor.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

InterlockedXor ( uint destination, uint value, uint &original ) : void

Performs a guaranteed atomic xor.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

Private Methods

Method Description
Abort ( ) : void
Clip ( Float1x1 x ) : void
Clip ( Float1x2 x ) : void
Clip ( Float1x3 x ) : void
Clip ( Float1x4 x ) : void
Clip ( Float2, x ) : void
Clip ( Float2x1 x ) : void
Clip ( Float2x2 x ) : void
Clip ( Float2x3 x ) : void
Clip ( Float2x4 x ) : void
Clip ( Float3, x ) : void
Clip ( Float3x1 x ) : void
Clip ( Float3x2 x ) : void
Clip ( Float3x3, x ) : void
Clip ( Float3x4 x ) : void
Clip ( Float4, x ) : void
Clip ( Float4x1 x ) : void
Clip ( Float4x2 x ) : void
Clip ( Float4x3 x ) : void
Clip ( Float4x4 x ) : void
Clip ( float x ) : void
Lit ( float nDotL, float nDotH, float m ) : float

Method Details

AllMemoryBarrier() public static method

Blocks execution of all threads in a group until all memory accesses have been completed.
A memory barrier guarantees that outstanding memory operations have completed. Threads are synchronized at GroupSync barriers. This may stall a thread or threads if memory operations are in progress.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

public static AllMemoryBarrier ( ) : void
return void

AllMemoryBarrierWithGroupSync() public static method

Blocks execution of all threads in a group until all memory accesses have been completed and all threads in the group have reached this call.
A memory barrier guarantees that outstanding memory operations have completed. Threads are synchronized at GroupSync barriers. This may stall a thread or threads if memory operations are in progress.

This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.

public static AllMemoryBarrierWithGroupSync ( ) : void
return void

DeviceMemoryBarrier() public static method

Blocks execution of all threads in a group until all device memory accesses have been completed.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static DeviceMemoryBarrier ( ) : void
return void

DeviceMemoryBarrierWithGroupSync() public static method

Blocks execution of all threads in a group until all device memory accesses have been completed and all threads in the group have reached this call.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static DeviceMemoryBarrierWithGroupSync ( ) : void
return void

GroupMemoryBarrier() public static method

Blocks execution of all threads in a group until all group shared accesses have been completed.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static GroupMemoryBarrier ( ) : void
return void

GroupMemoryBarrierWithGroupSync() public static method

Blocks execution of all threads in a group until all group shared accesses have been completed and all threads in the group have reached this call.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static GroupMemoryBarrierWithGroupSync ( ) : void
return void

InterlockedAdd() public static method

Performs a guaranteed atomic add of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAdd ( int destination, int value ) : void
destination int The destination value.
value int The input value.
return void

InterlockedAdd() public static method

Performs a guaranteed atomic add of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAdd ( int destination, int value, int &original ) : void
destination int The destination value.
value int The input value.
original int The original input value.
return void

InterlockedAdd() public static method

Performs a guaranteed atomic add of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAdd ( uint destination, uint value ) : void
destination uint The destination value.
value uint The input value.
return void

InterlockedAdd() public static method

Performs a guaranteed atomic add of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAdd ( uint destination, uint value, uint &original ) : void
destination uint The destination value.
value uint The input value.
original uint The original input value.
return void

InterlockedAnd() public static method

Performs a guaranteed atomic and of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAnd ( int destination, int value ) : void
destination int The destination value.
value int The input value.
return void

InterlockedAnd() public static method

Performs a guaranteed atomic and of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAnd ( int destination, int value, int &original ) : void
destination int The destination value.
value int The input value.
original int The original input value.
return void

InterlockedAnd() public static method

Performs a guaranteed atomic and of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAnd ( uint destination, uint value ) : void
destination uint The destination value.
value uint The input value.
return void

InterlockedAnd() public static method

Performs a guaranteed atomic and of a value to a destination.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedAnd ( uint destination, uint value, uint &original ) : void
destination uint The destination value.
value uint The input value.
original uint The original input value.
return void

InterlockedCompareExchange() public static method

Atomically compares the destination with the comparison value. If they are identical, the destination is overwritten with the input value. The original value is set to the destination's original value.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedCompareExchange ( int destination, int comparison, int value, int &original ) : void
destination int The destination value.
comparison int The comparison value.
value int The input value.
original int The original input value.
return void

InterlockedCompareExchange() public static method

Atomically compares the destination with the comparison value. If they are identical, the destination is overwritten with the input value. The original value is set to the destination's original value.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedCompareExchange ( uint destination, uint comparison, uint value, uint &original ) : void
destination uint The destination value.
comparison uint The comparison value.
value uint The input value.
original uint The original input value.
return void

InterlockedCompareStore() public static method

Atomically compares the destination to the comparison value. If they are identical, the destination is overwritten with the input value.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedCompareStore ( int destination, int comparison, int value ) : void
destination int The destination value.
comparison int The comparison value.
value int The input value.
return void

InterlockedCompareStore() public static method

Atomically compares the destination to the comparison value. If they are identical, the destination is overwritten with the input value.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedCompareStore ( uint destination, uint comparison, uint value ) : void
destination uint The destination value.
comparison uint The comparison value.
value uint The input value.
return void

InterlockedExchange() public static method

Assigns value to dest and returns the original value.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedExchange ( int destination, int value, int &original ) : void
destination int The destination value.
value int The input value.
original int The original input value.
return void

InterlockedExchange() public static method

Assigns value to dest and returns the original value.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedExchange ( uint destination, uint value, uint &original ) : void
destination uint The destination value.
value uint The input value.
original uint The original input value.
return void

InterlockedMax() public static method

Performs a guaranteed atomic max.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMax ( int destination, int value ) : void
destination int The destination value.
value int The input value.
return void

InterlockedMax() public static method

Performs a guaranteed atomic max.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMax ( int destination, int value, int &original ) : void
destination int The destination value.
value int The input value.
original int The original input value.
return void

InterlockedMax() public static method

Performs a guaranteed atomic max.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMax ( uint destination, uint value ) : void
destination uint The destination value.
value uint The input value.
return void

InterlockedMax() public static method

Performs a guaranteed atomic max.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMax ( uint destination, uint value, uint &original ) : void
destination uint The destination value.
value uint The input value.
original uint The original input value.
return void

InterlockedMin() public static method

Performs a guaranteed atomic min.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMin ( int destination, int value ) : void
destination int The destination value.
value int The input value.
return void

InterlockedMin() public static method

Performs a guaranteed atomic min.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMin ( int destination, int value, int &original ) : void
destination int The destination value.
value int The input value.
original int The original input value.
return void

InterlockedMin() public static method

Performs a guaranteed atomic min.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMin ( uint destination, uint value ) : void
destination uint The destination value.
value uint The input value.
return void

InterlockedMin() public static method

Performs a guaranteed atomic min.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedMin ( uint destination, uint value, uint &original ) : void
destination uint The destination value.
value uint The input value.
original uint The original input value.
return void

InterlockedOr() public static method

Performs a guaranteed atomic or.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedOr ( int destination, int value ) : void
destination int The destination value.
value int The input value.
return void

InterlockedOr() public static method

Performs a guaranteed atomic or.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedOr ( int destination, int value, int &original ) : void
destination int The destination value.
value int The input value.
original int The original input value.
return void

InterlockedOr() public static method

Performs a guaranteed atomic or.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedOr ( uint destination, uint value ) : void
destination uint The destination value.
value uint The input value.
return void

InterlockedOr() public static method

Performs a guaranteed atomic or.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedOr ( uint destination, uint value, uint &original ) : void
destination uint The destination value.
value uint The input value.
original uint The original input value.
return void

InterlockedXor() public static method

Performs a guaranteed atomic xor.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedXor ( int destination, int value ) : void
destination int The destination value.
value int The input value.
return void

InterlockedXor() public static method

Performs a guaranteed atomic xor.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedXor ( int destination, int value, int &original ) : void
destination int The destination value.
value int The input value.
original int The original input value.
return void

InterlockedXor() public static method

Performs a guaranteed atomic xor.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedXor ( uint destination, uint value ) : void
destination uint The destination value.
value uint The input value.
return void

InterlockedXor() public static method

Performs a guaranteed atomic xor.
This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static InterlockedXor ( uint destination, uint value, uint &original ) : void
destination uint The destination value.
value uint The input value.
original uint The original input value.
return void