nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Computing.ILCuda.GPUTensor / DeviceCache

DeviceCache

Full name Microsoft.VisualBasic.Computing.ILCuda.GPUTensor.DeviceCache`1 Assembly Microsoft.VisualBasic.Computing.ILCuda.GPUTensor Members 6

01 Syntax

Microsoft.VisualBasic.Computing.ILCuda.GPUTensor.DeviceCache`1

02 Methods

NameOverloadsSummary
.ctor 1
GetBuffer 1 取得主机数组对应的显存缓冲;版本不一致时用 convert 重新上传。
Evict 1 按 LRU 淘汰直到腾出需要的空间
Clear 1 释放全部驻留的显存缓冲

03 Properties

NameOverloadsSummary
Bytes 1 已驻留的字节数
Count 1 当前驻留的缓冲个数

04 Members

method .ctor #
#ctor(Int64)
Parameters
NameTypeDescription
capacityBytesInt64

显存容量上限(字节);<= 0 表示不限制

method GetBuffer #
GetBuffer(CudaEngine, Double(), Int64, Func(Of Double(), `0()))

取得主机数组对应的显存缓冲;版本不一致时用 convert 重新上传。

Parameters
NameTypeDescription
convertCudaEngine

主机 Double 数组到显存元素类型的转换(identity 或降精度)

method Evict #
Evict(Int64)

按 LRU 淘汰直到腾出需要的空间

method Clear #
Clear

释放全部驻留的显存缓冲

property Bytes #
Bytes

已驻留的字节数

property Count #
Count

当前驻留的缓冲个数