Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/CogitatorTech/infera
/ functions
Functions
97 in github.com/CogitatorTech/infera
⨍
Functions
97
◇
Types & classes
10
↓ 16 callers
Function
InferaScalarFunction
* @brief Creates a DuckDB scalar function with Infera execution metadata. * * Infera functions generally read or mutate model engine state, and many
infera/bindings/infera_extension.cpp:47
↓ 14 callers
Function
infera_free
(ptr: *mut c_char)
infera/src/ffi_utils.rs:50
↓ 13 callers
Function
infera_free_result
(res: InferaInferenceResult)
infera/src/ffi_utils.rs:70
↓ 12 callers
Function
handle_remote_model
Handles the download and caching of a remote model from a URL. If the model for the given URL is already present in the local cache, this function pe
infera/src/http.rs:179
↓ 10 callers
Function
infera_last_error
()
infera/src/error.rs:97
↓ 8 callers
Function
cache_dir
Return the cache directory path used by Infera for remote models.
infera/src/http.rs:46
↓ 8 callers
Function
set_last_error
Sets the last error for the current thread. This stores the given error in a thread-local variable so it can be retrieved later by FFI clients using
infera/src/error.rs:78
↓ 7 callers
Function
GetInferaError
* @brief Retrieves the last error message from the Infera Rust core. * @return A string containing the error message, or "unknown error" if not set.
infera/bindings/infera_extension.cpp:35
↓ 6 callers
Function
infera_predict
( model_name: *const c_char, data: *const f32, rows: usize, cols: usize, )
infera/src/lib.rs:128
↓ 5 callers
Function
infera_set_autoload_dir
(path: *const c_char)
infera/src/lib.rs:389
↓ 4 callers
Function
infera_predict_from_blob
( model_name: *const c_char, blob_data: *const u8, blob_len: usize, )
infera/src/lib.rs:175
↓ 3 callers
Function
ExtractFeatures
* @brief Extracts numerical features from a DataChunk. * * Iterates over the input DataChunk (skipping the first column, which is the * model name)
infera/bindings/infera_extension.cpp:181
↓ 3 callers
Function
LoadInternal
* @brief Registers all the Infera functions with DuckDB. * * This internal helper function is called by the extension loading mechanism to * regist
infera/bindings/infera_extension.cpp:528
↓ 3 callers
Function
ValidateAndGetModelName
* @brief Validates the input arguments and extracts the model name. * * Checks that there are at least two arguments and that the first argument (th
infera/bindings/infera_extension.cpp:221
↓ 3 callers
Function
infera_get_model_info
(model_name: *const c_char)
infera/src/lib.rs:216
↓ 3 callers
Function
infera_unload_model
(name: *const c_char)
infera/src/lib.rs:82
↓ 2 callers
Method
as_str
(&self)
infera/src/config.rs:36
↓ 2 callers
Function
clear_cache
Clears the entire cache directory by deleting its contents. If the directory does not exist, this is a no-op.
infera/src/http.rs:124
↓ 2 callers
Function
get_cached_files_by_access_time
Gets metadata about cached files sorted by access time (oldest first).
infera/src/http.rs:65
↓ 2 callers
Function
infera_get_cache_info
()
infera/src/lib.rs:327
↓ 2 callers
Function
infera_get_loaded_models
()
infera/src/lib.rs:246
↓ 2 callers
Function
infera_get_version
()
infera/src/lib.rs:276
↓ 2 callers
Function
infera_load_model
(name: *const c_char, path: *const c_char)
infera/src/lib.rs:39
↓ 2 callers
Function
load_model_impl
(name: &str, path: &str)
infera/src/engine.rs:48
↓ 2 callers
Function
shape_rows_cols
Compute (rows, cols) from a tensor shape by flattening all dimensions after the first into cols. Rules: - Scalar (shape = []): (1, 1) - 1D (shape = [
infera/src/engine.rs:19
↓ 2 callers
Function
touch_cache_file
Updates the access time of a cached file by touching it.
infera/src/http.rs:56
↓ 1 callers
Method
commit
Marks the file as "committed," preventing its deletion on drop. This should be called only after the file has been successfully and atomically moved t
infera/src/http.rs:32
↓ 1 callers
Function
download_file
Download a file from a URL to a local path with timeout, optionally verifying via ETag.
infera/src/http.rs:297
↓ 1 callers
Function
evict_cache_if_needed
Evicts least recently used cache files until cache size is below limit.
infera/src/http.rs:98
↓ 1 callers
Function
get_cache_size
Calculates total cache size in bytes.
infera/src/http.rs:92
↓ 1 callers
Function
get_cache_size_limit
Gets the cache size limit in bytes from environment variable or default.
infera/src/http.rs:51
↓ 1 callers
Function
get_model_metadata_impl
(model_name: &str)
infera/src/engine.rs:293
↓ 1 callers
Function
infera_clear_cache
()
infera/src/lib.rs:300
↓ 1 callers
Function
main
()
test/concurrency/test_concurrency.py:53
↓ 1 callers
Function
run_inference_blob_impl
( model_name: &str, blob_data: *const u8, blob_len: usize, )
infera/src/engine.rs:200
↓ 1 callers
Function
run_inference_impl
( model_name: &str, data: *const f32, rows: usize, cols: usize, )
infera/src/engine.rs:112
Function
ClearCache
* @brief Implements the `infera_clear_cache()` SQL function. * * Clears the entire model cache directory, freeing up disk space. * * @param args T
infera/bindings/infera_extension.cpp:492
Function
GetCacheInfo
* @brief Implements the `infera_get_cache_info()` SQL function. * * Returns cache statistics as a JSON string. * * @param args The input arguments
infera/bindings/infera_extension.cpp:512
Function
GetFlatVectorDataWritable
infera/bindings/infera_extension.cpp:27
Function
GetLoadedModels
* @brief Implements the `infera_get_loaded_models()` SQL function. * * Returns a JSON array of the names of all currently loaded models. * * @para
infera/bindings/infera_extension.cpp:321
Function
GetModelInfo
* @brief Implements the `infera_get_model_info(name)` SQL function. * * Retrieves metadata for a specific model and returns it as a JSON string. *
infera/bindings/infera_extension.cpp:455
Function
GetVersion
* @brief Implements the `infera_get_version()` SQL function. * * Fetches version and build information from the Rust core and returns it as a * JSO
infera/bindings/infera_extension.cpp:97
Function
IsModelLoaded
infera/bindings/infera_extension.cpp:332
Method
Load
infera/bindings/infera_extension.cpp:576
Function
LoadModel
* @brief Implements the `infera_load_model(name, path)` SQL function. * * Takes a model name and a file path/URL, passing them to the Rust core to
infera/bindings/infera_extension.cpp:115
Method
Name
infera/bindings/infera_extension.cpp:577
Function
Predict
* @brief Implements the `infera_predict(name, ...features)` SQL function. * * Extracts features, runs inference using the Rust core, and populates t
infera/bindings/infera_extension.cpp:242
Function
PredictFromBlob
* @brief Implements the `infera_predict_from_blob(name, blob)` SQL function. * * Runs inference on raw blob data. The result is a list of floats. *
infera/bindings/infera_extension.cpp:279
Function
PredictMulti
* @brief Implements the `infera_predict_multi(name, ...features)` SQL function. * * Similar to `Predict`, but returns the model's output as a JSON-e
infera/bindings/infera_extension.cpp:364
Function
PredictMultiList
* @brief Implements the `infera_predict_multi_list(name, ...features)` SQL function. * * Similar to `PredictMulti`, but returns the model's output a
infera/bindings/infera_extension.cpp:412
Function
SetAutoloadDir
* @brief Implements the `infera_set_autoload_dir(path)` SQL function. * * This function takes a directory path, passes it to the Rust core to load a
infera/bindings/infera_extension.cpp:70
Function
UnloadModel
* @brief Implements the `infera_unload_model(name)` SQL function. * * Unloads a model from the Infera engine by its name. * * @param args The inpu
infera/bindings/infera_extension.cpp:149
Method
Version
infera/bindings/infera_extension.cpp:578
Method
default
()
infera/src/config.rs:185
Method
drop
(&mut self)
infera/src/http.rs:38
Method
error
Creates a new `InferaInferenceResult` representing an error state. The `data` pointer is null and the `status` is set to -1.
infera/src/ffi_utils.rs:28
Method
from
(_: StdUtf8Error)
infera/src/error.rs:65
Method
from_env
Load configuration from environment variables
infera/src/config.rs:101
Method
from_str
(s: &str)
infera/src/config.rs:26
Method
get_cache_dir_from_env
Get cache directory from INFERA_CACHE_DIR or default
infera/src/config.rs:115
Method
get_cache_eviction_strategy_from_env
Get cache eviction strategy from INFERA_CACHE_EVICTION or default (LRU)
infera/src/config.rs:163
Method
get_cache_size_limit_from_env
Get cache size limit from INFERA_CACHE_SIZE_LIMIT or default (1GB)
infera/src/config.rs:123
Method
get_http_retry_attempts_from_env
Get HTTP retry attempts from INFERA_HTTP_RETRY_ATTEMPTS or default (3)
infera/src/config.rs:147
Method
get_http_retry_delay_from_env
Get HTTP retry delay from INFERA_HTTP_RETRY_DELAY or default (1000ms)
infera/src/config.rs:155
Method
get_http_timeout_from_env
Get HTTP timeout from INFERA_HTTP_TIMEOUT or default (30 seconds)
infera/src/config.rs:139
Method
get_log_level_from_env
Get log level from INFERA_LOG_LEVEL or default (WARN)
infera/src/config.rs:171
Method
get_verbose_logging_from_env
Get verbose logging setting from INFERA_VERBOSE or default (false)
infera/src/config.rs:131
Function
infera_duckdb_cpp_init
Exported entry point expected by DuckDB when loading a C++ loadable extension. The build system passes -Wl,-exported_symbol,_infera_duckdb_cpp_init so
infera/bindings/infera_extension.cpp:586
Function
infera_init
Legacy/alternative entry point used by some tooling paths.
infera/bindings/infera_extension.cpp:591
Method
new
Creates a new guard for the given path.
infera/src/http.rs:22
Method
should_log
Check if a log message should be printed based on current log level
infera/src/config.rs:179
Function
test_cache_dir_ends_with_infera_cache
()
infera/src/config.rs:226
Function
test_cache_eviction_strategy_parsing
()
infera/src/config.rs:245
Function
test_clear_cache_removes_files
()
infera/src/http.rs:619
Function
test_default_config
()
infera/src/config.rs:214
Function
test_ffi_null_pointers
()
infera/src/lib.rs:501
Function
test_handle_remote_model_cleanup_on_connection_drop
()
infera/src/http.rs:412
Function
test_handle_remote_model_cleanup_on_incomplete_download
()
infera/src/http.rs:346
Function
test_handle_remote_model_download_error
()
infera/src/http.rs:379
Function
test_handle_remote_model_etag_changed_200
()
infera/src/http.rs:530
Function
test_handle_remote_model_etag_verified_304
()
infera/src/http.rs:481
Function
test_handle_remote_model_no_etag_support
()
infera/src/http.rs:583
Function
test_handle_remote_model_success_and_cache
()
infera/src/http.rs:456
Function
test_infera_free_result_non_empty
()
infera/src/ffi_utils.rs:99
Function
test_infera_free_result_zero_len_non_null
()
infera/src/ffi_utils.rs:84
Function
test_infera_get_cache_info_includes_configured_limit
()
infera/src/lib.rs:647
Function
test_infera_get_model_info_nonexistent_returns_error_json
()
infera/src/lib.rs:633
Function
test_infera_get_version
()
infera/src/lib.rs:435
Function
test_infera_predict_from_blob_invalid_size
()
infera/src/lib.rs:580
Function
test_infera_predict_invalid_shape
()
infera/src/lib.rs:604
Function
test_infera_set_autoload_dir
()
infera/src/lib.rs:448
Function
test_infera_set_autoload_dir_invalid_model
()
infera/src/lib.rs:480
Function
test_infera_set_autoload_dir_non_existent
()
infera/src/lib.rs:466
Function
test_log_level_parsing
()
infera/src/config.rs:236
Function
test_shape_rows_cols
()
infera/src/engine.rs:322
Function
test_should_log
()
infera/src/config.rs:262
Function
worker
(idx: int)
test/concurrency/test_concurrency.py:32