Classes | Functions
host.h File Reference

Host. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _VlX86CpuInfo

Defines

C preprocessor helper macros

------------------------------------------------------------------

#define VL_STRINGIFY(x)   # x
 Convert the argument to a string.
#define VL_XSTRINGIFY(x)   VL_STRINGIFY(x)
 Expand and then convert the argument to a string.
#define VL_CAT(x, y)   x ## y
 Concatenate two arguments into a lexical unit.
#define VL_XCAT(x, y)   VL_CAT(x,y)
 Expand and then concatenate two arguments into a lexical unit.
#define VL_XCAT3(x, y, z)   VL_XCAT(VL_XCAT(x,y),z)
 Expand and then concatenate three arguments into a lexical unit.
#define VL_XCAT4(x, y, z, u)   VL_XCAT(VL_XCAT3(x,y,z),u)
 Expand and then concatenate four arguments into a lexical unit.
#define VL_XCAT5(x, y, z, u, v)   VL_XCAT(VL_XCAT4(x,y,z,u),v)
 Expand and then concatenate five arguments into a lexical unit.
#define VL_YESNO(x)   ((x)?"yes":"no")
 Convert a boolean to "yes" or "no" strings.
Identifying the host data model
#define VL_COMPILER_ILP32
 Defined if the host compiler data model is ILP32.
Identifying the host endianness
#define VL_ARCH_BIG_ENDIAN
 Defined if the host CPU is big endian.
Creating integer constants
#define VL_INT8_C(x)   x
 Create an integer constant of the specified width and sign.
#define VL_INT16_C(x)   x
#define VL_INT32_C(x)   x
#define VL_INT64_C(x)   x ## LL
#define VL_UINT8_C(x)   x
#define VL_UINT16_C(x)   x
#define VL_UINT32_C(x)   x ## U
#define VL_UINT64_C(x)   x ## ULL
Printing the atomic data types

------------------------------------------------------------------

#define VL_FL_INT64   "ll"
 printf length flag for vl_int64 and vl_uint64.
#define VL_FL_INT32   ""
 printf length flag for vl_int32 and vl_uint32.
#define VL_FL_INT16   "h"
 printf length flag for vl_int16 and vl_uint16.
#define VL_FL_INT8   "hh"
 printf length flag for vl_int8 and vl_uint8.
#define VL_FL_INDEX   VL_FL_INT32
 printf length flag for vl_index and vl_uindex
#define VL_FMT_INDEX   VL_FL_INDEX "d"
 printf flag for vl_index
#define VL_FMT_INTPTR   VL_FMT_INDEX
 printf flag for vl_intptr
#define VL_FMT_UINDEX   VL_FL_INDEX "u"
 printf flag for vl_uindex
#define VL_FMT_SIZE   VL_FMT_UINDEX
 printf flag for vl_size
#define VL_FMT_UINTPTR   VL_FMT_UINDEX
 printf flag for vl_uintptr
Atomic data types limits

------------------------------------------------------------------

#define VL_BIG_INT   0x7FFFFFFFL
 Largest integer (math constant)
#define VL_SMALL_INT   (- VL_BIG_INT - 1)
 Smallest integer (math constant)
#define VL_BIG_UINT   0xFFFFFFFFUL
 Largest unsigned integer (math constant)

Functions

VL_EXPORT char * vl_static_configuration_to_string_copy ()
 Human readable static library configuration.
Endianness detection and conversion

------------------------------------------------------------------

VL_INLINE void vl_swap_host_big_endianness_8 (void *dst, void *src)
 Host <-> big endian transformation for 8-bytes value.
VL_INLINE void vl_swap_host_big_endianness_4 (void *dst, void *src)
 Host <-> big endian transformation for 4-bytes value.
VL_INLINE void vl_swap_host_big_endianness_2 (void *dst, void *src)
 Host <-> big endian transformation for 2-bytes value.

Atomic data types

------------------------------------------------------------------

#define VL_TRUE   1
 true (1) constant
#define VL_FALSE   0
 false (0) constant
typedef long long vl_int64
typedef int vl_int32
typedef short vl_int16
typedef char vl_int8
typedef long long unsigned vl_uint64
typedef int unsigned vl_uint32
typedef short unsigned vl_uint16
typedef char unsigned vl_uint8
typedef int vl_int
typedef unsigned int vl_uint
typedef int vl_bool
typedef vl_int32 vl_intptr
typedef vl_uint32 vl_uintptr
typedef vl_uint32 vl_size
typedef vl_int32 vl_index
typedef vl_uint32 vl_uindex

Obtaining host info at run time

------------------------------------------------------------------

typedef struct _VlX86CpuInfo VlX86CpuInfo
void _vl_x86cpu_info_init (VlX86CpuInfo *self)
char * _vl_x86cpu_info_to_string_copy (VlX86CpuInfo const *self)

Detailed Description

Host.

Author:
Andrea Vedaldi
See also:
Portability features

Definition in file host.h.


Define Documentation

Defined if the host CPU is big endian.

See also:
Endianness

Definition at line 308 of file host.h.

#define VL_BIG_INT   0x7FFFFFFFL

Largest integer (math constant)

Definition at line 534 of file host.h.

#define VL_BIG_UINT   0xFFFFFFFFUL

Largest unsigned integer (math constant)

Definition at line 540 of file host.h.

#define VL_CAT (   x,
 
)    x ## y

Concatenate two arguments into a lexical unit.

Parameters:
xfirst argument to be concatenated.
ysecond argument to be concatenated.

This macro concatenates its arguments into a single lexical unit by means of the ## preprocessor operator. Notice that arguments concatenated by ## are not pre-expanded by the C preprocessor. To macro-expand the arguments and then concatenate them,use VL_XCAT.

See also:
VL_XCAT

Definition at line 100 of file host.h.

Defined if the host compiler data model is ILP32.

See also:
Data models

Definition at line 292 of file host.h.

#define VL_FALSE   0

false (0) constant

Definition at line 371 of file host.h.

#define VL_FL_INDEX   VL_FL_INT32

printf length flag for vl_index and vl_uindex

Definition at line 496 of file host.h.

#define VL_FL_INT16   "h"

printf length flag for vl_int16 and vl_uint16.

Definition at line 488 of file host.h.

#define VL_FL_INT32   ""

printf length flag for vl_int32 and vl_uint32.

Definition at line 487 of file host.h.

#define VL_FL_INT64   "ll"

printf length flag for vl_int64 and vl_uint64.

Definition at line 485 of file host.h.

#define VL_FL_INT8   "hh"

printf length flag for vl_int8 and vl_uint8.

Definition at line 489 of file host.h.

#define VL_FMT_INDEX   VL_FL_INDEX "d"

printf flag for vl_index

Definition at line 521 of file host.h.

printf flag for vl_intptr

Definition at line 522 of file host.h.

#define VL_FMT_SIZE   VL_FMT_UINDEX

printf flag for vl_size

Definition at line 524 of file host.h.

#define VL_FMT_UINDEX   VL_FL_INDEX "u"

printf flag for vl_uindex

Definition at line 523 of file host.h.

printf flag for vl_uintptr

Definition at line 525 of file host.h.

#define VL_INT16_C (   x)    x

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 445 of file host.h.

#define VL_INT32_C (   x)    x

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 446 of file host.h.

#define VL_INT64_C (   x)    x ## LL

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 447 of file host.h.

#define VL_INT8_C (   x)    x

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 444 of file host.h.

#define VL_SMALL_INT   (- VL_BIG_INT - 1)

Smallest integer (math constant)

Definition at line 537 of file host.h.

#define VL_STRINGIFY (   x)    # x

Convert the argument to a string.

Parameters:
xvalue to be stringified.

This macro stringifies the argument x by means of the # prerpocessor operator.

The standard C preprocessor does not prescan arguments which are stringified, so

 #define A B
 char const * str = VL_STRINGIFY(A) ;

initializes str with a pointer to the string "A", which mihgt be unexpected. To fix this issue, you can use VL_XSTRINGIFY.

See also:
VL_XSTRINGIFY

Definition at line 66 of file host.h.

#define VL_TRUE   1

true (1) constant

Definition at line 370 of file host.h.

#define VL_UINT16_C (   x)    x

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 450 of file host.h.

#define VL_UINT32_C (   x)    x ## U

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 451 of file host.h.

#define VL_UINT64_C (   x)    x ## ULL

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 452 of file host.h.

#define VL_UINT8_C (   x)    x

Create an integer constant of the specified width and sign.

Parameters:
xinteger constant.
Returns:
x with the correct suffix for the given sign and size. The suffix used depends on the Data models.
Example:
The macro VL_INT64_C(1234) is expanded as 123L in a LP64 system and as 123LL in a LLP64 system.

Definition at line 449 of file host.h.

#define VL_XCAT (   x,
 
)    VL_CAT(x,y)

Expand and then concatenate two arguments into a lexical unit.

Parameters:
xfirst argument to be concatenated.
ysecond argument to be concatenated.

This macro is the same as VL_CAT, except that the arguments are macro expanded before being concatenated.

See also:
VL_CAT

Definition at line 112 of file host.h.

#define VL_XCAT3 (   x,
  y,
 
)    VL_XCAT(VL_XCAT(x,y),z)

Expand and then concatenate three arguments into a lexical unit.

Parameters:
xfirst argument to be concatenated.
ysecond argument to be concatenated.
zthird argument to be concatenated.

This macro is the same as VL_XCAT, except that it has three arguments.

See also:
VL_XCAT

Definition at line 124 of file host.h.

#define VL_XCAT4 (   x,
  y,
  z,
 
)    VL_XCAT(VL_XCAT3(x,y,z),u)

Expand and then concatenate four arguments into a lexical unit.

Parameters:
xfirst argument to be concatenated.
ysecond argument to be concatenated.
zthird argument to be concatenated.
ufourth argument to be concatenated.

This macro is the same as VL_XCAT, except that it has four arguments.

See also:
VL_XCAT

Definition at line 137 of file host.h.

#define VL_XCAT5 (   x,
  y,
  z,
  u,
 
)    VL_XCAT(VL_XCAT4(x,y,z,u),v)

Expand and then concatenate five arguments into a lexical unit.

Parameters:
xfirst argument to be concatenated.
ysecond argument to be concatenated.
zthird argument to be concatenated.
ufourth argument to be concatenated.
vfifth argument to be concatenated.

This macro is the same as VL_XCAT, except that it has five arguments.

See also:
VL_XCAT

Definition at line 151 of file host.h.

#define VL_XSTRINGIFY (   x)    VL_STRINGIFY(x)

Expand and then convert the argument to a string.

Parameters:
xvalue to be macro-expanded and converted.

This macro macro-expands the argument x and stringifies the result of the expansion. For instance

 #define A B
 char const * str = VL_STRINGIFY(A) ;

initializes str with a pointer to the string "B".

See also:
VL_STRINGIFY

Definition at line 85 of file host.h.

#define VL_YESNO (   x)    ((x)?"yes":"no")

Convert a boolean to "yes" or "no" strings.

Parameters:
xboolean to convert.

A pointer to either the string "yes" (if x is true) or the string "no".

Example
 VL_PRINTF("Is x true? %s.", VL_YESNO(x))

Definition at line 165 of file host.h.


Typedef Documentation

typedef int vl_bool

Definition at line 419 of file host.h.

typedef vl_int32 vl_index

Definition at line 423 of file host.h.

typedef int vl_int

Definition at line 416 of file host.h.

typedef short vl_int16

Definition at line 404 of file host.h.

typedef int vl_int32

Definition at line 403 of file host.h.

typedef long long vl_int64

Definition at line 400 of file host.h.

typedef char vl_int8

Definition at line 405 of file host.h.

Definition at line 420 of file host.h.

typedef vl_uint32 vl_size

Definition at line 422 of file host.h.

Definition at line 424 of file host.h.

typedef unsigned int vl_uint

Definition at line 417 of file host.h.

typedef short unsigned vl_uint16

Definition at line 413 of file host.h.

typedef int unsigned vl_uint32

Definition at line 412 of file host.h.

typedef long long unsigned vl_uint64

Definition at line 410 of file host.h.

typedef char unsigned vl_uint8

Definition at line 414 of file host.h.

Definition at line 421 of file host.h.

typedef struct _VlX86CpuInfo VlX86CpuInfo

Function Documentation

---------------------------------------------------------------

Definition at line 445 of file host.c.

Definition at line 468 of file host.c.

Human readable static library configuration.

------------------------------------------------------------------

Returns:
a new string with the static configuration.

The string includes information about the compiler, the host, and other static configuration parameters. The string must be released by vl_free.

Definition at line 501 of file host.c.

VL_INLINE void vl_swap_host_big_endianness_2 ( void dst,
void src 
)

Host <-> big endian transformation for 2-bytes value.

------------------------------------------------------------------

Parameters:
dstdestination 2-byte buffer.
srcsource 2-byte bufffer.
See also:
Endianness.

Definition at line 646 of file host.h.

VL_INLINE void vl_swap_host_big_endianness_4 ( void dst,
void src 
)

Host <-> big endian transformation for 4-bytes value.

------------------------------------------------------------------

Parameters:
dstdestination 4-byte buffer.
srcsource 4-byte bufffer.
See also:
Endianness.

Definition at line 620 of file host.h.

VL_INLINE void vl_swap_host_big_endianness_8 ( void dst,
void src 
)

Host <-> big endian transformation for 8-bytes value.

------------------------------------------------------------------

Parameters:
dstdestination 8-byte buffer.
srcsource 8-byte bufffer.
See also:
Endianness.

Definition at line 586 of file host.h.



libvlfeat
Author(s): Andrea Vedaldi
autogenerated on Thu Jun 6 2019 20:25:52