LLamaTokenDataArrayNative
Namespace: LLama.Native
Contains a pointer to an array of LLamaTokenData which is pinned in memory.
public struct LLamaTokenDataArrayNative
Inheritance Object → ValueType → LLamaTokenDataArrayNative
Fields
data
A pointer to an array of LlamaTokenData
public IntPtr data;
Remarks:
Memory must be pinned in place for all the time this LLamaTokenDataArrayNative is in use
size
Number of LLamaTokenData in the array
public ulong size;
Properties
sorted
Indicates if the items in the array are sorted
public bool sorted { get; set; }
Property Value
Methods
Create(LLamaTokenDataArray, LLamaTokenDataArrayNative&)
Create a new LLamaTokenDataArrayNative around the data in the LLamaTokenDataArray
MemoryHandle Create(LLamaTokenDataArray array, LLamaTokenDataArrayNative& native)
Parameters
array
LLamaTokenDataArray
Data source
native
LLamaTokenDataArrayNative&
Created native array
Returns
MemoryHandle
A memory handle, pinning the data in place until disposed