Skip to content

LLamaTokenDataArrayNative

Namespace: LLama.Native

Contains a pointer to an array of LLamaTokenData which is pinned in memory.

1
public struct LLamaTokenDataArrayNative

Inheritance ObjectValueTypeLLamaTokenDataArrayNative

Fields

data

A pointer to an array of LlamaTokenData

1
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

1
public ulong size;

Properties

sorted

Indicates if the items in the array are sorted

1
public bool sorted { get; set; }

Property Value

Boolean

Methods

Create(LLamaTokenDataArray, LLamaTokenDataArrayNative&)

Create a new LLamaTokenDataArrayNative around the data in the LLamaTokenDataArray

1
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