|
void | Halide::load_plugin (const std::string &lib_name) |
| Load a plugin in the form of a dynamic library (e.g.
|
|
template<typename DST , typename SRC , typename std::enable_if< std::is_floating_point< SRC >::value >::type * = nullptr> |
DST | Halide::Internal::safe_numeric_cast (SRC s) |
| Some numeric conversions are UB if the value won't fit in the result; safe_numeric_cast<>() is meant as a drop-in replacement for a C/C++ cast that adds well-defined behavior for the UB cases, attempting to mimic common implementation behavior as much as possible.
|
|
template<typename DstType , typename SrcType > |
DstType | Halide::Internal::reinterpret_bits (const SrcType &src) |
| An aggressive form of reinterpret cast used for correct type-punning.
|
|
std::string | Halide::Internal::get_env_variable (char const *env_var_name) |
| Get value of an environment variable.
|
|
std::string | Halide::Internal::running_program_name () |
| Get the name of the currently running executable.
|
|
std::string | Halide::Internal::unique_name (char prefix) |
| Generate a unique name starting with the given prefix.
|
|
std::string | Halide::Internal::unique_name (const std::string &prefix) |
|
bool | Halide::Internal::starts_with (const std::string &str, const std::string &prefix) |
| Test if the first string starts with the second string.
|
|
bool | Halide::Internal::ends_with (const std::string &str, const std::string &suffix) |
| Test if the first string ends with the second string.
|
|
std::string | Halide::Internal::replace_all (const std::string &str, const std::string &find, const std::string &replace) |
| Replace all matches of the second string in the first string with the last string.
|
|
std::vector< std::string > | Halide::Internal::split_string (const std::string &source, const std::string &delim) |
| Split the source string using 'delim' as the divider.
|
|
template<typename T > |
std::string | Halide::Internal::join_strings (const std::vector< T > &sources, const std::string &delim) |
| Join the source vector using 'delim' as the divider.
|
|
template<typename T , typename Fn > |
T | Halide::Internal::fold_left (const std::vector< T > &vec, Fn f) |
| Perform a left fold of a vector.
|
|
template<typename T , typename Fn > |
T | Halide::Internal::fold_right (const std::vector< T > &vec, Fn f) |
| Returns a right fold of a vector.
|
|
std::string | Halide::Internal::extract_namespaces (const std::string &name, std::vector< std::string > &namespaces) |
| Returns base name and fills in namespaces, outermost one first in vector.
|
|
std::string | Halide::Internal::strip_namespaces (const std::string &name) |
| Like extract_namespaces(), but strip and discard the namespaces, returning base name only.
|
|
std::string | Halide::Internal::file_make_temp (const std::string &prefix, const std::string &suffix) |
| Create a unique file with a name of the form prefixXXXXXsuffix in an arbitrary (but writable) directory; this is typically /tmp, but the specific location is not guaranteed.
|
|
std::string | Halide::Internal::dir_make_temp () |
| Create a unique directory in an arbitrary (but writable) directory; this is typically somewhere inside /tmp, but the specific location is not guaranteed.
|
|
bool | Halide::Internal::file_exists (const std::string &name) |
| Wrapper for access().
|
|
void | Halide::Internal::assert_file_exists (const std::string &name) |
| assert-fail if the file doesn't exist.
|
|
void | Halide::Internal::assert_no_file_exists (const std::string &name) |
| assert-fail if the file DOES exist.
|
|
void | Halide::Internal::file_unlink (const std::string &name) |
| Wrapper for unlink().
|
|
void | Halide::Internal::ensure_no_file_exists (const std::string &name) |
| Ensure that no file with this path exists.
|
|
void | Halide::Internal::dir_rmdir (const std::string &name) |
| Wrapper for rmdir().
|
|
FileStat | Halide::Internal::file_stat (const std::string &name) |
| Wrapper for stat().
|
|
std::vector< char > | Halide::Internal::read_entire_file (const std::string &pathname) |
| Read the entire contents of a file into a vector<char>.
|
|
void | Halide::Internal::write_entire_file (const std::string &pathname, const void *source, size_t source_len) |
| Create or replace the contents of a file with a given pointer-and-length of memory.
|
|
void | Halide::Internal::write_entire_file (const std::string &pathname, const std::vector< char > &source) |
|
bool | Halide::Internal::add_would_overflow (int bits, int64_t a, int64_t b) |
| Routines to test if math would overflow for signed integers with the given number of bits.
|
|
bool | Halide::Internal::sub_would_overflow (int bits, int64_t a, int64_t b) |
|
bool | Halide::Internal::mul_would_overflow (int bits, int64_t a, int64_t b) |
|
HALIDE_MUST_USE_RESULT bool | Halide::Internal::add_with_overflow (int bits, int64_t a, int64_t b, int64_t *result) |
| Routines to perform arithmetic on signed types without triggering signed overflow.
|
|
HALIDE_MUST_USE_RESULT bool | Halide::Internal::sub_with_overflow (int bits, int64_t a, int64_t b, int64_t *result) |
|
HALIDE_MUST_USE_RESULT bool | Halide::Internal::mul_with_overflow (int bits, int64_t a, int64_t b, int64_t *result) |
|
void | Halide::Internal::halide_tic_impl (const char *file, int line) |
|
void | Halide::Internal::halide_toc_impl (const char *file, int line) |
|
template<typename T > |
auto | Halide::Internal::begin (reverse_adaptor< T > i) |
|
template<typename T > |
auto | Halide::Internal::end (reverse_adaptor< T > i) |
|
template<typename T > |
reverse_adaptor< T > | Halide::Internal::reverse_view (T &&range) |
| Reverse-order adaptor for range-based for-loops.
|
|
std::string | Halide::Internal::c_print_name (const std::string &name, bool prefix_underscore=true) |
| Emit a version of a string that is a valid identifier in C (.
|
|
int | Halide::Internal::get_llvm_version () |
| Return the LLVM_VERSION against which this libHalide is compiled.
|
|
void | Halide::set_compiler_stack_size (size_t) |
| Set how much stack the compiler should use for compilation in bytes.
|
|
size_t | Halide::get_compiler_stack_size () |
| Return how much stack size the compiler should use for calls that go through run_with_large_stack below.
|
|
void | Halide::Internal::run_with_large_stack (const std::function< void()> &action) |
| Call the given action in a platform-specific context that provides at least the stack space returned by get_compiler_stack_size.
|
|
int | Halide::Internal::popcount64 (uint64_t x) |
| Portable versions of popcount, count-leading-zeros, and count-trailing-zeros.
|
|
int | Halide::Internal::clz64 (uint64_t x) |
|
int | Halide::Internal::ctz64 (uint64_t x) |
|
int64_t | Halide::Internal::next_power_of_two (int64_t x) |
| Return an integer 2^n, for some n, which is >= x.
|
|
template<typename T > |
T | Halide::Internal::align_up (T x, int n) |
|
Various utility functions used internally Halide.
Definition in file Util.h.