Constructor NativeTensorArray
NativeTensorArray(SafeHandle, int)
Initializes and returns an instance of NativeTensorArray with a preexisting handle.
Declaration
protected NativeTensorArray(SafeHandle safeHandle, int dataLength)
Parameters
| Type | Name | Description |
|---|---|---|
| SafeHandle | safeHandle | The safe handle to the data. |
| int | dataLength | The integer number of elements. |
NativeTensorArray(int, bool, Allocator)
Initializes and returns an instance of NativeTensorArray with a given length.
Declaration
public NativeTensorArray(int length, bool clearOnInit = false, Allocator allocator = Allocator.Persistent)
Parameters
| Type | Name | Description |
|---|---|---|
| int | length | The integer number of elements to allocate. |
| bool | clearOnInit | Whether to zero the data after allocating. |
| Allocator | allocator | The allocation type to use as an |