Class CudaKernelArgument
Stores a copied scalar or a managed CUDA memory owner without exposing native pointers. 保存复制型标量或托管 CUDA memory owner,不暴露 native pointer。
public sealed class CudaKernelArgument
- Inheritance
-
CudaKernelArgument
- Inherited Members
Properties
Kind
Gets the argument ownership/layout kind. 获取参数 ownership/layout 类型。
public CudaKernelArgumentKind Kind { get; }
Property Value
MemoryOffset
Gets the byte offset within a device-memory owner. 获取 device-memory owner 内的字节偏移。
public int MemoryOffset { get; }
Property Value
ScalarSizeInBytes
Gets the copied scalar size. 获取复制型标量大小。
public int ScalarSizeInBytes { get; }
Property Value
ScalarType
Gets the scalar type, or None for device memory. 获取标量类型;device memory 返回 None。
public CudaKernelScalarType ScalarType { get; }
Property Value
Methods
FromBoolean(bool)
Copies a Boolean scalar argument. 复制 Boolean 标量参数。
public static CudaKernelArgument FromBoolean(bool value)
Parameters
valuebool
Returns
FromByte(byte)
Copies an unsigned 8-bit scalar argument. 复制无符号 8 位标量参数。
public static CudaKernelArgument FromByte(byte value)
Parameters
valuebyte
Returns
FromDeviceMemory(CudaMemory, int)
Creates an owner-bound device-memory argument. 创建 owner-bound device-memory 参数。
public static CudaKernelArgument FromDeviceMemory(CudaMemory memory, int byteOffset = 0)
Parameters
memoryCudaMemorybyteOffsetint
Returns
FromDouble(double)
Copies an IEEE 754 double-precision scalar argument. 复制 IEEE 754 双精度标量参数。
public static CudaKernelArgument FromDouble(double value)
Parameters
valuedouble
Returns
FromInt16(short)
Copies a signed 16-bit scalar argument. 复制有符号 16 位标量参数。
public static CudaKernelArgument FromInt16(short value)
Parameters
valueshort
Returns
FromInt32(int)
Copies a signed 32-bit scalar argument. 复制有符号 32 位标量参数。
public static CudaKernelArgument FromInt32(int value)
Parameters
valueint
Returns
FromInt64(long)
Copies a signed 64-bit scalar argument. 复制有符号 64 位标量参数。
public static CudaKernelArgument FromInt64(long value)
Parameters
valuelong
Returns
FromSByte(sbyte)
Copies a signed 8-bit scalar argument. 复制有符号 8 位标量参数。
public static CudaKernelArgument FromSByte(sbyte value)
Parameters
valuesbyte
Returns
FromSingle(float)
Copies an IEEE 754 single-precision scalar argument. 复制 IEEE 754 单精度标量参数。
public static CudaKernelArgument FromSingle(float value)
Parameters
valuefloat
Returns
FromUInt16(ushort)
Copies an unsigned 16-bit scalar argument. 复制无符号 16 位标量参数。
public static CudaKernelArgument FromUInt16(ushort value)
Parameters
valueushort
Returns
FromUInt32(uint)
Copies an unsigned 32-bit scalar argument. 复制无符号 32 位标量参数。
public static CudaKernelArgument FromUInt32(uint value)
Parameters
valueuint
Returns
FromUInt64(ulong)
Copies an unsigned 64-bit scalar argument. 复制无符号 64 位标量参数。
public static CudaKernelArgument FromUInt64(ulong value)
Parameters
valueulong