ailiaSetTemporaryCachePathA method

int ailiaSetTemporaryCachePathA(
  1. Pointer<Char> cache_dir
)

~japanese @brief 一時キャッシュディレクトリを指定します @param cache_dir 一時キャッシュディレクトリ @return 成功した場合は \ref AILIA_STATUS_SUCCESS 、そうでなければエラーコードを返す。 @details 指定したキャッシュディレクトリは推論実行環境毎に最適化したマシンコードを生成して保存するためにシステムが利用します。 ailia の実行開始時に一度だけ呼び出してください。二回目以降の呼び出しに対しては無視して成功を返します。 複数スレッドから呼び出された場合も内部で排他制御しているので特に問題は発生しません。 Vulkan のシェーダーキャッシュ機能など、この API を呼ぶまで利用できないものがあります。 cache_dirにはContext.getCacheDir()で取得したファイルパスを指定してください。

~english @brief Specifies a temporary cache directory. @param cache_dir Temporary cache directory @return If this function is successful, it returns \ref AILIA_STATUS_SUCCESS , or an error code otherwise. @details This system uses the specified cache directory to generate and store machine code optimized for each inference backend. Call only once at the start of execution of ailia. It ignores any second and subsequent calls, and automatically returns success. There is no particular problem if it is called from multiple threads, as it provides exclusive control internally. Some functions, such as Vulkan shader cache, cannot be used until this API function is called. Specify the file path obtained by Context.getCacheDir() for cache_dir.

Implementation

int ailiaSetTemporaryCachePathA(
  ffi.Pointer<ffi.Char> cache_dir,
) {
  return _ailiaSetTemporaryCachePathA(
    cache_dir,
  );
}