Class: LlamaCpp::LlamaKvCacheView
- Inherits:
-
Object
- Object
- LlamaCpp::LlamaKvCacheView
- Defined in:
- ext/llama_cpp/llama_cpp.c,
ext/llama_cpp/llama_cpp.c
Overview
“struct llama_kv_cache_view” wrapper class
Instance Method Summary collapse
- #max_contiguous ⇒ Integer
- #max_contiguous_idx ⇒ Integer
- #n_cells ⇒ Integer
- #n_seq_max ⇒ Integer
- #token_count ⇒ Integer
- #used_cells ⇒ Integer
Instance Method Details
#max_contiguous ⇒ Integer
1954 1955 1956 1957 |
# File 'ext/llama_cpp/llama_cpp.c', line 1954
static VALUE llama_kv_cache_view_get_max_contiguous(VALUE self) {
struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
return INT2NUM(data->max_contiguous);
}
|
#max_contiguous_idx ⇒ Integer
1959 1960 1961 1962 |
# File 'ext/llama_cpp/llama_cpp.c', line 1959
static VALUE llama_kv_cache_view_get_max_contiguous_idx(VALUE self) {
struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
return INT2NUM(data->max_contiguous_idx);
}
|
#n_cells ⇒ Integer
1934 1935 1936 1937 |
# File 'ext/llama_cpp/llama_cpp.c', line 1934
static VALUE llama_kv_cache_view_get_n_cells(VALUE self) {
struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
return INT2NUM(data->n_cells);
}
|
#n_seq_max ⇒ Integer
1939 1940 1941 1942 |
# File 'ext/llama_cpp/llama_cpp.c', line 1939
static VALUE llama_kv_cache_view_get_n_seq_max(VALUE self) {
struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
return INT2NUM(data->n_seq_max);
}
|
#token_count ⇒ Integer
1944 1945 1946 1947 |
# File 'ext/llama_cpp/llama_cpp.c', line 1944
static VALUE llama_kv_cache_view_get_token_count(VALUE self) {
struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
return INT2NUM(data->token_count);
}
|
#used_cells ⇒ Integer
1949 1950 1951 1952 |
# File 'ext/llama_cpp/llama_cpp.c', line 1949
static VALUE llama_kv_cache_view_get_used_cells(VALUE self) {
struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
return INT2NUM(data->used_cells);
}
|