Add [UnscopedRef] support to HLSL vector types

このコミットが含まれているのは:
Sergio Pedri committed 2022-09-16 10:38:38 -07:00
1 親 f41ce77acd
コミット 7ab9427cb4
13ファイル変更
+4014 -93

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

+65 -5
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System.Globalization;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
#endif
#nullable enable
@@ -60,357 +60,417 @@ public unsafe partial struct Double2
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>X</c> component.
/// </summary>
public readonly ref double X => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref double X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>Y</c> component.
/// </summary>
public readonly ref double Y => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref double Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double2 XX => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Double2 XY => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Double2 YX => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double2 YY => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 XXX => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 XXY => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 XYX => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 XYY => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 YXX => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 YXY => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 YYX => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 YYY => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XXXX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XXXY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XXYX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XXYY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XYXX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XYXY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XYYX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 XYYY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YXXX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YXXY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YXYX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YXYY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YYXX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YYXY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YYYX => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 YYYY => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>R</c> component.
/// </summary>
public readonly ref double R => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref double R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>G</c> component.
/// </summary>
public readonly ref double G => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref double G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double2 RR => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Double2 RG => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Double2 GR => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double2 GG => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 RRR => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 RRG => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 RGR => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 RGG => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 GRR => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 GRG => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 GGR => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double3 GGG => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RRRR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RRRG => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RRGR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RRGG => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RGRR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RGRG => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RGGR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 RGGG => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GRRR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GRRG => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GRGR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GRGG => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GGRR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GGRG => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GGGR => ref *(Double4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Double4 GGGG => ref *(Double4*)UndefinedData;
#if !SOURCE_GENERATOR
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+66 -6
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System.Globalization;
using ComputeSharp.Core.Intrinsics.Attributes;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
#endif
#nullable enable
@@ -61,357 +61,417 @@ public unsafe partial struct Float2
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>X</c> component.
/// </summary>
public readonly ref float X => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref float X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>Y</c> component.
/// </summary>
public readonly ref float Y => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref float Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float2 XX => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Float2 XY => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Float2 YX => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float2 YY => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 XXX => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 XXY => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 XYX => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 XYY => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 YXX => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 YXY => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 YYX => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 YYY => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XXXX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XXXY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XXYX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XXYY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XYXX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XYXY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XYYX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 XYYY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YXXX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YXXY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YXYX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YXYY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YYXX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YYXY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YYYX => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 YYYY => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>R</c> component.
/// </summary>
public readonly ref float R => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref float R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>G</c> component.
/// </summary>
public readonly ref float G => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref float G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float2 RR => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Float2 RG => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Float2 GR => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float2 GG => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 RRR => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 RRG => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 RGR => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 RGG => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 GRR => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 GRG => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 GGR => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float3 GGG => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RRRR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RRRG => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RRGR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RRGG => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RGRR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RGRG => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RGGR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 RGGG => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GRRR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GRRG => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GRGR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GRGG => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GGRR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GGRG => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GGGR => ref *(Float4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Float4 GGGG => ref *(Float4*)UndefinedData;
#if !SOURCE_GENERATOR
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+66 -6
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System.Globalization;
using ComputeSharp.Core.Intrinsics.Attributes;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
#endif
#nullable enable
@@ -61,357 +61,417 @@ public unsafe partial struct Int2
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>X</c> component.
/// </summary>
public readonly ref int X => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref int X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>Y</c> component.
/// </summary>
public readonly ref int Y => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref int Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int2 XX => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Int2 XY => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Int2 YX => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int2 YY => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 XXX => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 XXY => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 XYX => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 XYY => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 YXX => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 YXY => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 YYX => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 YYY => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XXXX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XXXY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XXYX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XXYY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XYXX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XYXY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XYYX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 XYYY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YXXX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YXXY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YXYX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YXYY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YYXX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YYXY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YYYX => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 YYYY => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>R</c> component.
/// </summary>
public readonly ref int R => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref int R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>G</c> component.
/// </summary>
public readonly ref int G => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref int G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int2 RR => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Int2 RG => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref Int2 GR => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int2 GG => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 RRR => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 RRG => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 RGR => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 RGG => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 GRR => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 GRG => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 GGR => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int3 GGG => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RRRR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RRRG => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RRGR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RRGG => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RGRR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RGRG => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RGGR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 RGGG => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GRRR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GRRG => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GRGR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GRGG => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GGRR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GGRG => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GGGR => ref *(Int4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly Int4 GGGG => ref *(Int4*)UndefinedData;
#if !SOURCE_GENERATOR
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+65 -5
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System.Globalization;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
#endif
#nullable enable
@@ -60,357 +60,417 @@ public unsafe partial struct UInt2
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>X</c> component.
/// </summary>
public readonly ref uint X => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref uint X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>Y</c> component.
/// </summary>
public readonly ref uint Y => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref uint Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt2 XX => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref UInt2 XY => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref UInt2 YX => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt2 YY => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 XXX => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 XXY => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 XYX => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 XYY => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 YXX => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 YXY => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 YYX => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 YYY => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XXXX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XXXY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XXYX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XXYY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XYXX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XYXY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XYYX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 XYYY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YXXX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YXXY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YXYX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YXYY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YYXX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YYXY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YYYX => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>, <see cref="Y"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 YYYY => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>R</c> component.
/// </summary>
public readonly ref uint R => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.x), 1));
[UnscopedRef]
public readonly ref uint R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>G</c> component.
/// </summary>
public readonly ref uint G => ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.y), 1));
[UnscopedRef]
public readonly ref uint G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt2 RR => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref UInt2 RG => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref UInt2 GR => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt2 GG => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 RRR => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 RRG => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 RGR => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 RGG => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 GRR => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 GRG => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 GGR => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt3 GGG => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RRRR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RRRG => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RRGR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RRGG => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RGRR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RGRG => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RGGR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="R"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 RGGG => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GRRR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GRRG => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GRGR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="R"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GRGG => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GGRR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GGRG => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GGGR => ref *(UInt4*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt4"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="G"/>, <see cref="G"/>.
/// </summary>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[UnscopedRef]
public readonly ref readonly UInt4 GGGG => ref *(UInt4*)UndefinedData;
#if !SOURCE_GENERATOR
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+5 -4
ファイルの表示
@@ -64,11 +64,11 @@ void GenerateVectorProperties(string typeName, int elementSize)
WriteLine("using ComputeSharp.Core.Intrinsics.Attributes;");
}
#>
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
#endif
#nullable enable
@@ -206,16 +206,16 @@ public unsafe partial struct <#=typeName#>
char fieldName = "xyzw"["xyzwrgba".IndexOf(propertyName.ToLower()) % 4];
// Property
Write($"public readonly {refType} {propertyType} {propertyName} ");
WriteLine("[UnscopedRef]");
if (isBoolType)
{
// For bool types, also reinterpret cast from int to bool (the backing field is int to ensure all 4 bytes are initialized)
WriteLine($"=> ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.As<int, bool>(ref Unsafe.AsRef(in this.{fieldName})), 1));");
WriteLine($"public readonly {refType} {propertyType} {propertyName} => ref Unsafe.As<int, bool>(ref this.{fieldName});");
}
else
{
WriteLine($"=> ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Unsafe.AsRef(in this.{fieldName}), 1));");
WriteLine($"public readonly {refType} {propertyType} {propertyName} => ref this.{fieldName};");
}
}
else
@@ -229,6 +229,7 @@ public unsafe partial struct <#=typeName#>
WriteLine("/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>");
// Property
WriteLine("[UnscopedRef]");
Write($"public readonly {refType} {propertyType} {propertyName} ");
WriteLine($"=> ref *({propertyType}*)UndefinedData;");
}