Interface ITensorData
An interface that represents a device-dependent representation of the data in a tensor.
Syntax
public interface ITensorData : IDisposable
Properties
deviceType
On what device backend are the data elements stored
Declaration
DeviceType deviceType { get; }
Property Value
maxCapacity
The maximum count of the stored data elements.
Declaration
Property Value
Methods
Download<T>(Int32, Int32)
Returns data from internal storage.
Declaration
T[] Download<T>(int dstCount, int srcOffset = 0)
where T : struct
Parameters
Type |
Name |
Description |
Int32 |
dstCount |
|
Int32 |
srcOffset |
|
Returns
Type Parameters
Reserve(Int32)
Reserves memory for count
elements.
Declaration
Parameters
Type |
Name |
Description |
Int32 |
count |
|
ScheduleAsyncDownload()
Schedules asynchronous download of the internal data.
Declaration
bool ScheduleAsyncDownload()
Returns
Upload<T>(T[], Int32, Int32)
Uploads the tensor data to internal storage.
Declaration
void Upload<T>(T[] data, int srcCount, int srcOffset = 0)
where T : struct
Parameters
Type |
Name |
Description |
T[] |
data |
|
Int32 |
srcCount |
|
Int32 |
srcOffset |
|
Type Parameters