Table of Contents

Class CudaMemoryInfo

Namespace
JYPPX.CudaSharp
Assembly
JYPPX.CudaSharp.dll

Reports CUDA device memory availability for the current device. 报告当前 CUDA 设备的显存可用性。

public sealed class CudaMemoryInfo
Inheritance
CudaMemoryInfo
Inherited Members

Constructors

CudaMemoryInfo(ulong, ulong)

Creates a CUDA memory information snapshot. 创建 CUDA 显存信息快照。

public CudaMemoryInfo(ulong freeBytes, ulong totalBytes)

Parameters

freeBytes ulong

Free device memory in bytes. 空闲显存字节数。

totalBytes ulong

Total device memory in bytes. 总显存字节数。

Properties

FreeBytes

Gets free device memory in bytes. 获取空闲显存字节数。

public ulong FreeBytes { get; }

Property Value

ulong

FreeRatio

Gets free device memory as a ratio in the range 0 to 1. 获取空闲显存比例,范围为 0 到 1。

public double FreeRatio { get; }

Property Value

double

TotalBytes

Gets total device memory in bytes. 获取总显存字节数。

public ulong TotalBytes { get; }

Property Value

ulong

UsedBytes

Gets used device memory in bytes. 获取已使用显存字节数。

public ulong UsedBytes { get; }

Property Value

ulong

UsedRatio

Gets used device memory as a ratio in the range 0 to 1. 获取已使用显存比例,范围为 0 到 1。

public double UsedRatio { get; }

Property Value

double