Turi Create
4.0
|
Modules | |
Hashing | |
A generic set of hashing functions built around Google's cityhash. | |
Set And Map Utilities | |
Some mathematical Set and Map routines. | |
Classes | |
class | turi::value_container_mapper< Value, ValueContainer > |
class | turi::thread_pool |
class | turi::timer |
A simple class that can be used for benchmarking/timing up to microsecond resolution. More... | |
struct | turi::rdtsc_time |
class | turi::any |
class | turi::blocking_queue< T > |
Implements a blocking queue useful for producer/consumer models. More... | |
class | turi::buffer_pool< T > |
class | turi::dense_bitset |
class | turi::fast_integer_power |
class | turi::function_output_iterator< UnaryFunction, MoveFunction > |
struct | turi::lru_cache< Key, Value > |
class | turi::mutable_queue< T, Priority > |
class | turi::safe_circular_char_buffer |
class | turi::scoped_finally |
Macros | |
#define | __likely__(x) __builtin_expect((x),1) |
#define | __unlikely__(x) __builtin_expect((x),0) |
#define | GL_HOT_INLINE |
#define | GL_HOT_INLINE_FLATTEN |
#define | GL_HOT_FLATTEN |
#define | GL_COLD_NOINLINE_ERROR __attribute__((cold, noinline, noreturn)) |
Typedefs | |
typedef boost::iostreams::stream< charstream_impl::resizing_array_sink< true > > | turi::charstream |
Functions | |
uint32_t | turi::get_local_ip (bool print=true) |
std::string | turi::get_local_ip_as_str (bool print=true) |
std::pair< size_t, int > | turi::get_free_tcp_port () |
rdtsc_type | turi::estimate_ticks_per_second () |
rdtsc_type | turi::rdtsc (void) |
template<typename T , typename LessThan > | |
void | turi::extract_and_sort_top_k (std::vector< T > &v, size_t top_k, LessThan less_than) |
template<typename T > | |
void | turi::extract_and_sort_top_k (std::vector< T > &v, size_t top_k) |
std::string | turi::md5 (std::string val) |
std::string | turi::md5_raw (std::string val) |
std::string | get_last_err_str (unsigned err_code) |
template<typename T , typename U > | |
void | turi::_save_and_load_object (T &dest, const U &src, std::string dir) |
#define __likely__ | ( | x | ) | __builtin_expect((x),1) |
Sets a branch as likely.
Definition at line 21 of file branch_hints.hpp.
#define __unlikely__ | ( | x | ) | __builtin_expect((x),0) |
Sets a branch as unlikely.
Definition at line 35 of file branch_hints.hpp.
#define GL_COLD_NOINLINE_ERROR __attribute__((cold, noinline, noreturn)) |
This is used with various assertion routines. It never returns. The noreturn suppresses the "warning: control reaches end of non-void function" messages you get by using it this way.
Definition at line 90 of file code_optimization.hpp.
#define GL_HOT_FLATTEN |
Forces flatten
Definition at line 61 of file code_optimization.hpp.
#define GL_HOT_INLINE |
Forces always inline
Definition at line 42 of file code_optimization.hpp.
#define GL_HOT_INLINE_FLATTEN |
Forces always inline and flatten
Definition at line 51 of file code_optimization.hpp.
typedef boost::iostreams::stream< charstream_impl::resizing_array_sink<true> > turi::charstream |
A stream object which stores all streamed output in memory. It can be used like any other stream object. For instance:
stream->size() will return the current length of output and stream->c_str() will return a mutable pointer to the string.
Definition at line 118 of file charstream.hpp.
void turi::_save_and_load_object | ( | T & | dest, |
const U & | src, | ||
std::string | dir | ||
) |
Serializes and deserializes a model, making sure that the model leaves the stream iterator in the appropriate place.
Definition at line 43 of file testing_utils.hpp.
rdtsc_type turi::estimate_ticks_per_second | ( | ) |
Estimates the number of RDTSC ticks per second.
void turi::extract_and_sort_top_k | ( | std::vector< T > & | v, |
size_t | top_k, | ||
LessThan | less_than | ||
) |
Goes through and extracts the top k out of all the elements in v, then resizes v to be of size top_k. After running this, the elements of v are in sorted descending order.
Definition at line 87 of file fast_top_k.hpp.
void turi::extract_and_sort_top_k | ( | std::vector< T > & | v, |
size_t | top_k | ||
) |
Goes through and extracts the top k out of all the elements in v, then resizes v to be of size top_k. After running this, the elements of v are in sorted descending order.
Definition at line 117 of file fast_top_k.hpp.
std::pair<size_t, int> turi::get_free_tcp_port | ( | ) |
Find a free tcp port and binds it. Caller must release the port. Returns a pair of [port, socket handle]
std::string get_last_err_str | ( | unsigned | err_code | ) |
Portable version of strerror
uint32_t turi::get_local_ip | ( | bool | print = true | ) |
Returns the first non-localhost ipv4 address
std::string turi::get_local_ip_as_str | ( | bool | print = true | ) |
Returns the first non-localhost ipv4 address as a standard dot delimited string
std::string turi::md5 | ( | std::string | val | ) |
Computes the md5 checksum of a string, returning the md5 checksum in a hexadecimal string
std::string turi::md5_raw | ( | std::string | val | ) |
Returns a 16 byte (non hexadecimal) string of the raw md5.