Table of Contents

Class CudaKernelArgument

Namespace
JYPPX.CudaSharp
Assembly
JYPPX.CudaSharp.dll

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

CudaKernelArgumentKind

MemoryOffset

Gets the byte offset within a device-memory owner. 获取 device-memory owner 内的字节偏移。

public int MemoryOffset { get; }

Property Value

int

ScalarSizeInBytes

Gets the copied scalar size. 获取复制型标量大小。

public int ScalarSizeInBytes { get; }

Property Value

int

ScalarType

Gets the scalar type, or None for device memory. 获取标量类型;device memory 返回 None。

public CudaKernelScalarType ScalarType { get; }

Property Value

CudaKernelScalarType

Methods

FromBoolean(bool)

Copies a Boolean scalar argument. 复制 Boolean 标量参数。

public static CudaKernelArgument FromBoolean(bool value)

Parameters

value bool

Returns

CudaKernelArgument

FromByte(byte)

Copies an unsigned 8-bit scalar argument. 复制无符号 8 位标量参数。

public static CudaKernelArgument FromByte(byte value)

Parameters

value byte

Returns

CudaKernelArgument

FromDeviceMemory(CudaMemory, int)

Creates an owner-bound device-memory argument. 创建 owner-bound device-memory 参数。

public static CudaKernelArgument FromDeviceMemory(CudaMemory memory, int byteOffset = 0)

Parameters

memory CudaMemory
byteOffset int

Returns

CudaKernelArgument

FromDouble(double)

Copies an IEEE 754 double-precision scalar argument. 复制 IEEE 754 双精度标量参数。

public static CudaKernelArgument FromDouble(double value)

Parameters

value double

Returns

CudaKernelArgument

FromInt16(short)

Copies a signed 16-bit scalar argument. 复制有符号 16 位标量参数。

public static CudaKernelArgument FromInt16(short value)

Parameters

value short

Returns

CudaKernelArgument

FromInt32(int)

Copies a signed 32-bit scalar argument. 复制有符号 32 位标量参数。

public static CudaKernelArgument FromInt32(int value)

Parameters

value int

Returns

CudaKernelArgument

FromInt64(long)

Copies a signed 64-bit scalar argument. 复制有符号 64 位标量参数。

public static CudaKernelArgument FromInt64(long value)

Parameters

value long

Returns

CudaKernelArgument

FromSByte(sbyte)

Copies a signed 8-bit scalar argument. 复制有符号 8 位标量参数。

public static CudaKernelArgument FromSByte(sbyte value)

Parameters

value sbyte

Returns

CudaKernelArgument

FromSingle(float)

Copies an IEEE 754 single-precision scalar argument. 复制 IEEE 754 单精度标量参数。

public static CudaKernelArgument FromSingle(float value)

Parameters

value float

Returns

CudaKernelArgument

FromUInt16(ushort)

Copies an unsigned 16-bit scalar argument. 复制无符号 16 位标量参数。

public static CudaKernelArgument FromUInt16(ushort value)

Parameters

value ushort

Returns

CudaKernelArgument

FromUInt32(uint)

Copies an unsigned 32-bit scalar argument. 复制无符号 32 位标量参数。

public static CudaKernelArgument FromUInt32(uint value)

Parameters

value uint

Returns

CudaKernelArgument

FromUInt64(ulong)

Copies an unsigned 64-bit scalar argument. 复制无符号 64 位标量参数。

public static CudaKernelArgument FromUInt64(ulong value)

Parameters

value ulong

Returns

CudaKernelArgument