Added F# sample

このコミットが含まれているのは:
Sergio Pedri committed 2021-03-10 23:27:55 +01:00
1 親 23c8680461
コミット ae9f574324
5ファイル変更
+127

検索条件に一致するファイルはありません

+17
ファイルの表示
@@ -0,0 +1,17 @@
namespace ComputeSharp.Sample.FSharp.Shaders
{
/// <summary>
/// A sample shader thaat just multiplies items in a buffer by two.
/// </summary>
[AutoConstructor]
public readonly partial struct MultiplyByTwo : IComputeShader
{
public readonly ReadWriteBuffer<float> buffer;
/// <inheritdoc/>
public void Execute()
{
buffer[ThreadIds.X] *= 2;
}
}
}