-
Notifications
You must be signed in to change notification settings - Fork 539
Expand file tree
/
Copy pathIMemoryBlock.cs
More file actions
37 lines (32 loc) · 1.13 KB
/
IMemoryBlock.cs
File metadata and controls
37 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Text;
namespace Tensorflow.NumPy
{
public interface IMemoryBlock
{
/// <summary>
/// The size of a single item stored in <see cref="Address"/>.
/// </summary>
/// <remarks>Equivalent to <see cref="TF_DataType.SizeOf"/> extension.</remarks>
int ItemLength { get; }
/// <summary>
/// The start address of this memory block.
/// </summary>
unsafe void* Address { get; }
/// <summary>
/// How many items are stored in <see cref="Address"/>.
/// </summary>
/// <remarks>Not to confuse with <see cref="BytesLength"/></remarks>
long Count { get; }
/// <summary>
/// How many bytes are stored in this memory block.
/// </summary>
/// <remarks>Calculated by <see cref="Count"/>*<see cref="ItemLength"/></remarks>
long BytesLength { get; }
/// <summary>
/// The <see cref="TF_DataType"/> of the type stored inside this memory block.
/// </summary>
TF_DataType TypeCode { get; }
}
}