LLamaSharp/docs/xmldocs/llama.native.llamatokendata...

1.5 KiB

LLamaTokenDataArrayNative

Namespace: LLama.Native

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

public struct LLamaTokenDataArrayNative

Inheritance ObjectValueTypeLLamaTokenDataArrayNative

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

Boolean

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