Defines |
#define | VL_ERR_MSG_LEN 1024 |
| Maximum length (in characters) of an error message.
|
#define | VL_VERSION_STRING "0.9.20" |
| Library version string.
|
|
------------------------------------------------------------------
|
#define | VL_MIN(x, y) (((x)<(y))?(x):(y)) |
| Compute the minimum between two values.
|
#define | VL_MAX(x, y) (((x)>(y))?(x):(y)) |
| Compute the maximum between two values.
|
#define | VL_SHIFT_LEFT(x, n) (((n)>=0)?((x)<<(n)):((x)>>-(n))) |
| Signed left shift operation.
|
Functions |
VL_EXPORT char * | vl_configuration_to_string_copy (void) |
| Get VLFeat configuration string.
|
VL_EXPORT vl_bool | vl_cpu_has_avx (void) |
| Check for AVX instruction set.
|
VL_EXPORT vl_bool | vl_cpu_has_sse2 (void) |
| Check for SSE2 instruction set.
|
VL_EXPORT vl_bool | vl_cpu_has_sse3 (void) |
| Check for SSE3 instruction set.
|
VL_EXPORT vl_size | vl_get_num_cpus (void) |
| Get the number of CPU cores of the host.
|
VL_EXPORT VlRand * | vl_get_rand (void) |
| Get the default random number generator.
|
VL_EXPORT vl_bool | vl_get_simd_enabled (void) |
| Are SIMD instructons enabled?
|
VL_EXPORT char const * | vl_get_version_string (void) |
| Get VLFeat version string.
|
VL_EXPORT void | vl_set_simd_enabled (vl_bool x) |
| Toggle usage of SIMD instructions.
|
|
VL_EXPORT vl_size | vl_get_max_threads (void) |
| Get the maximum number of computational threads used by VLFeat.
|
VL_EXPORT void | vl_set_num_threads (vl_size n) |
VL_EXPORT vl_size | vl_get_thread_limit (void) |
| Get the number of computational threads available to the application.
|
|
------------------------------------------------------------------
|
VL_EXPORT void | vl_set_alloc_func (void *(*malloc_func)(size_t), void *(*realloc_func)(void *, size_t), void *(*calloc_func)(size_t, size_t), void(*free_func)(void *)) |
| Set memory allocation functions.
|
VL_EXPORT void * | vl_malloc (size_t n) |
| Allocate a memory block.
|
VL_EXPORT void * | vl_realloc (void *ptr, size_t n) |
| Reallocate a memory block.
|
VL_EXPORT void * | vl_calloc (size_t n, size_t size) |
| Free and clear a memory block.
|
VL_EXPORT void * | vl_memalign (size_t n, size_t size) |
VL_EXPORT void | vl_free (void *ptr) |
| Free a memory block.
|
|
------------------------------------------------------------------
|
VL_EXPORT void | vl_tic (void) |
| Reset processor time reference The function resets VLFeat TIC/TOC time reference. There is one such reference per thread.
|
VL_EXPORT double | vl_toc (void) |
| Get elapsed time since tic.
|
VL_EXPORT double | vl_get_cpu_time (void) |
| Get processor time.
|
Type identifiers for atomic data types |
#define | VL_TYPE_FLOAT 1 |
#define | VL_TYPE_DOUBLE 2 |
#define | VL_TYPE_INT8 3 |
#define | VL_TYPE_UINT8 4 |
#define | VL_TYPE_INT16 5 |
#define | VL_TYPE_UINT16 6 |
#define | VL_TYPE_INT32 7 |
#define | VL_TYPE_UINT32 8 |
#define | VL_TYPE_INT64 9 |
#define | VL_TYPE_UINT64 10 |
typedef vl_uint32 | vl_type |
VL_INLINE char const * | vl_get_type_name (vl_type type) |
| Get the name of a data type.
|
VL_INLINE vl_size | vl_get_type_size (vl_type type) |
| Get data type size.
|
Error handling |
------------------------------------------------------------------
|
#define | VL_ERR_OK 0 |
#define | VL_ERR_OVERFLOW 1 |
#define | VL_ERR_ALLOC 2 |
#define | VL_ERR_BAD_ARG 3 |
#define | VL_ERR_IO 4 |
#define | VL_ERR_EOF 5 |
#define | VL_ERR_NO_MORE 5 |
VL_EXPORT int | vl_get_last_error (void) |
| Get the code of the last error.
|
VL_EXPORT char const * | vl_get_last_error_message (void) |
| Get the last error message.
|
VL_EXPORT int | vl_set_last_error (int error, char const *errorMessage,...) |
| Set last VLFeat error.
|
Logging |
------------------------------------------------------------------
|
#define | VL_PRINTF (*vl_get_printf_func()) |
| Call user-customizable printf function.
|
#define | VL_PRINT (*vl_get_printf_func()) |
| Same as VL_PRINTF (legacy code)
|
typedef int(* | printf_func_t )(char const *format,...) |
| Customizable printf function pointer type.
|
VL_EXPORT void | vl_set_printf_func (printf_func_t printf_func) |
| Set the printf function.
|
VL_EXPORT printf_func_t | vl_get_printf_func (void) |
| Get the printf function.
|
Generic (General support functionalities)
- Author:
- Andrea Vedaldi
Definition in file generic.h.
Get the maximum number of computational threads used by VLFeat.
- Returns:
- number of threads.
This function returns the maximum number of thread used by VLFeat. VLFeat will try to use this number of computational threads and never exceed it.
This is similar to the OpenMP function omp_get_max_threads()
; however, it reads a parameter private to VLFeat which is independent of the value used by the OpenMP library.
If VLFeat was compiled without OpenMP support, this function returns 1.
- See also:
- vl_set_num_threads(), Parallel computations
Definition at line 1175 of file generic.c.