Loading...
Searching...
No Matches
Halide::Internal::JITSharedRuntime Class Reference

`#include <JITModule.h>`

## Static Public Member Functions

static std::vector< JITModule > | get (llvm::Module *m, const Target &target, bool create=true)
static void | populate_jit_handlers (JITUserContext *jit_user_context, const JITHandlers &handlers)
static JITHandlers | set_default_handlers (const JITHandlers &handlers)
static void | memoization_cache_set_size (int64_t size)
| Set the maximum number of bytes used by memoization caching.
static void | memoization_cache_evict (uint64_t eviction_key)
| Evict all cache entries that were tagged with the given eviction_key in the memoize scheduling directive.
static void | reuse_device_allocations (bool)
| Set whether or not Halide may hold onto and reuse device allocations to avoid calling expensive device API allocation functions.
static void | release_all ()
static int | get_num_threads ()
| Get the number of threads in the Halide thread pool.
static int | set_num_threads (int)
| Set the number of threads to use in the Halide thread pool, inclusive of the calling thread.

## Detailed Description

Definition at line 260 of file JITModule.h.

## Member Function Documentation

## get()

std::vector< JITModule > Halide::Internal::JITSharedRuntime::get | ( | llvm::Module * | m,
|  | const Target & | target,
|  | bool | create = true )

static

## populate_jit_handlers()

void Halide::Internal::JITSharedRuntime::populate_jit_handlers | ( | JITUserContext * | jit_user_context,
|  | const JITHandlers & | handlers )

static

## set_default_handlers()

JITHandlers Halide::Internal::JITSharedRuntime::set_default_handlers | ( | const JITHandlers & | handlers | ) |

static

## memoization_cache_set_size()

void Halide::Internal::JITSharedRuntime::memoization_cache_set_size | ( | int64_t | size | ) |

static

Set the maximum number of bytes used by memoization caching.

If you are compiling statically, you should include HalideRuntime.h and call halide_memoization_cache_set_size() instead.

## memoization_cache_evict()

void Halide::Internal::JITSharedRuntime::memoization_cache_evict | ( | uint64_t | eviction_key | ) |

static

Evict all cache entries that were tagged with the given eviction_key in the memoize scheduling directive.

If you are compiling statically, you should include HalideRuntime.h and call halide_memoization_cache_evict() instead.

## reuse_device_allocations()

void Halide::Internal::JITSharedRuntime::reuse_device_allocations | ( | bool |  | ) |

static

Set whether or not Halide may hold onto and reuse device allocations to avoid calling expensive device API allocation functions.

If you are compiling statically, you should include HalideRuntime.h and call halide_reuse_device_allocations instead.

## release_all()

void Halide::Internal::JITSharedRuntime::release_all | ( |  | ) |

static

## get_num_threads()

int Halide::Internal::JITSharedRuntime::get_num_threads | ( |  | ) |

static

Get the number of threads in the Halide thread pool.

Includes the calling thread. Meaningless if a custom_do_par_for has been set.

## set_num_threads()

int Halide::Internal::JITSharedRuntime::set_num_threads | ( | int |  | ) |

static

Set the number of threads to use in the Halide thread pool, inclusive of the calling thread.

Pass zero to use a reasonable default (typically the number of CPUs online). Calling this is meaningless if custom_do_par_for has been set. Halide may launch more threads than this if necessary to avoid deadlock when using the async scheduling directive. Returns the old number.

The documentation for this class was generated from the following file:

- src/JITModule.h