host.c File Reference


Detailed Description

Author:
Andrea Vedaldi

Definition in file host.c.

#include "host.h"
#include "generic.h"
#include <intrin.h>

Go to the source code of this file.


Defines

#define HAS_CPUID

Functions

void vl_set_simd_enabled (vl_bool x)
 Enalbe/disable usage of SIMD instructions.
vl_bool vl_get_simd_enabled ()
 Are SIMD instructons enabled?
vl_bool vl_cpu_has_sse3 ()
 Check for SSE3 instruction set.
vl_bool vl_cpu_has_sse2 ()
 Check for SSE2 instruction set.
void vl_print_host_info ()
 Print host information.

Variables

vl_bool simd_enabled = 1

Define Documentation

#define HAS_CPUID

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

Definition at line 320 of file host.c.


Function Documentation

vl_bool vl_cpu_has_sse2 (  ) 

Returns:
true if SSE2 is present.

Definition at line 431 of file host.c.

vl_bool vl_cpu_has_sse3 (  ) 

Returns:
true if SSE3 is present.

Definition at line 419 of file host.c.

vl_bool vl_get_simd_enabled (  ) 

Returns:
true is SIMD is enabled.

Definition at line 411 of file host.c.

Referenced by vl_print_host_info().

void vl_set_simd_enabled ( vl_bool  x  ) 

Parameters:
x set to true to enable SIMD instructions.
Notice that usage of SIMD instructions may be prevented due to lack of CPU support and data alignment issues.

See also:
vl_cpu_has_sse2(), vl_cpu_has_sse3(), etc.

Definition at line 403 of file host.c.


Variable Documentation

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

Definition at line 393 of file host.c.