Vc  0.7.5-dev
SIMD Vector Classes for C++
Vc Namespace Reference

Detailed Description

Vector Classes Namespace.

All functions and types of Vc are defined inside the Vc namespace.

To be precise, most types are actually defined inside a second namespace, such as Vc::SSE. At compile-time the correct implementation is simply imported into the Vc namespace.

Classes

class  CpuId
 This class is available for x86 / AMD64 systems to read and interpret information about the CPU's capabilities. More...
class  Allocator
 An allocator that uses global new and supports over-aligned types, as per [C++11 20.6.9]. More...
class  Vector
 The main SIMD vector class. More...
class  float_v
 SIMD Vector of single precision floats. More...
class  float_m
 Mask object to use with float_v objects. More...
class  double_v
 SIMD Vector of double precision floats. More...
class  double_m
 Mask object to use with double_v objects. More...
class  int_v
 SIMD Vector of 32 bit signed integers. More...
class  int_m
 Mask object to use with int_v objects. More...
class  uint_v
 SIMD Vector of 32 bit unsigned integers. More...
class  uint_m
 Mask object to use with uint_v objects. More...
class  short_v
 SIMD Vector of 16 bit signed integers. More...
class  short_m
 Mask object to use with short_v objects. More...
class  ushort_v
 SIMD Vector of 16 bit unsigned integers. More...
class  ushort_m
 Mask object to use with ushort_v objects. More...
class  sfloat_v
 SIMD Vector of single precision floats that is guaranteed to have as many entries as a Vc::short_v and Vc::ushort_v. More...
class  sfloat_m
 Mask object to use with sfloat_v objects. More...
class  VectorAlignedBase
 Helper class to ensure proper alignment. More...
class  VectorAlignedBaseT
 Helper class to ensure proper alignment. More...
class  InterleavedMemoryWrapper
 Wraps a pointer to memory with convenience functions to access it via vectors. More...
class  Memory
 A helper class for fixed-size two-dimensional arrays. More...
class  Memory< V, Size, 0u >
 A helper class to simplify usage of correctly aligned and padded memory, allowing both vector and scalar access. More...
class  Memory< V, 0u, 0u >
 A helper class that is very similar to Memory<V, Size> but with dynamically allocated memory and thus dynamic size. More...
class  VectorPointerHelperConst
 Helper class for the Memory::vector(size_t) class of functions. More...
class  VectorPointerHelper
 Helper class for the Memory::vector(size_t) class of functions. More...
class  MemoryBase
 Common interface to all Memory classes, independent of allocation on the stack or heap. More...

Enumerations

enum  PlatformConstants { VectorAlignment }
 Enum to declare platform specific constants. More...
enum  SpecialInitializer { Zero, One, IndexesFromZero }
 Enum to declare special initializers for vector constructors. More...
enum  LoadStoreFlags { Aligned, Unaligned, Streaming }
 Enum for load and store functions to select the optimizations that are safe to use. More...

Functions

float_v sqrt (const float_v &v)
 Returns the square root of v.
float_v rsqrt (const float_v &v)
 Returns the reciprocal square root of v.
float_v reciprocal (const float_v &v)
 Returns the reciprocal of v.
float_v abs (const float_v &v)
 Returns the absolute value of v.
float_v round (const float_v &v)
 Returns the closest integer to v; 0.5 is rounded to even.
float_v log (const float_v &v)
 Returns the natural logarithm of v.
float_v log2 (const float_v &v)
 Returns the base-2 logarithm of v.
float_v log10 (const float_v &v)
 Returns the base-10 logarithm of v.
float_v exp (const float_v &v)
 Returns the exponential of v.
float_v sin (const float_v &v)
 Returns the sine of v.
float_v cos (const float_v &v)
 Returns the cosine of v.
void sincos (const float_v &v, float_v *sin, float_v *cos)
 Calculates the sine and cosine of v.
float_v asin (const float_v &v)
 Returns the arcsine of v.
float_v atan (const float_v &v)
 Returns the arctangent of v.
float_v atan2 (const float_v &x, const float_v &y)
 Returns the arctangent of x / y.
float_v min (const float_v &x, const float_v &y)
 Returns the minimum of x and y.
float_v max (const float_v &x, const float_v &y)
 Returns the maximum of x and y.
float_v frexp (const float_v &x, int_v *e)
 Convert floating-point number to fractional and integral components.
float_v ldexp (float_v x, int_v e)
 Multiply floating-point number by integral power of 2.
float_m isfinite (const float_v &x)
 Returns a mask that tells whether the values in the vector are finite (i.e. not NaN or +/-inf).
float_m isnan (const float_v &x)
 Returns a mask that tells whether the values in the vector are NaN.
double_v sqrt (const double_v &v)
 Returns the square root of v.
double_v rsqrt (const double_v &v)
 Returns the reciprocal square root of v.
double_v reciprocal (const double_v &v)
 Returns the reciprocal of v.
double_v abs (const double_v &v)
 Returns the absolute value of v.
double_v round (const double_v &v)
 Returns the closest integer to v; 0.5 is rounded to even.
double_v log (const double_v &v)
 Returns the natural logarithm of v.
double_v log2 (const double_v &v)
 Returns the base-2 logarithm of v.
double_v log10 (const double_v &v)
 Returns the base-10 logarithm of v.
double_v exp (const double_v &v)
 Returns the exponential of v.
double_v sin (const double_v &v)
 Returns the sine of v.
double_v cos (const double_v &v)
 Returns the cosine of v.
void sincos (const double_v &v, double_v *sin, double_v *cos)
 Calculates the sine and cosine of v.
double_v asin (const double_v &v)
 Returns the arcsine of v.
double_v atan (const double_v &v)
 Returns the arctangent of v.
double_v atan2 (const double_v &x, const double_v &y)
 Returns the arctangent of x / y.
double_v min (const double_v &x, const double_v &y)
 Returns the minimum of x and y.
double_v max (const double_v &x, const double_v &y)
 Returns the maximum of x and y.
double_v frexp (const double_v &x, int_v *e)
 Convert floating-point number to fractional and integral components.
double_v ldexp (double_v x, int_v e)
 Multiply floating-point number by integral power of 2.
double_m isfinite (const double_v &x)
 Returns a mask that tells whether the values in the vector are finite (i.e. not NaN or +/-inf).
double_m isnan (const double_v &x)
 Returns a mask that tells whether the values in the vector are NaN.
sfloat_v sqrt (const sfloat_v &v)
 Returns the square root of v.
sfloat_v rsqrt (const sfloat_v &v)
 Returns the reciprocal square root of v.
sfloat_v reciprocal (const sfloat_v &v)
 Returns the reciprocal of v.
sfloat_v abs (const sfloat_v &v)
 Returns the absolute value of v.
sfloat_v round (const sfloat_v &v)
 Returns the closest integer to v; 0.5 is rounded to even.
sfloat_v log (const sfloat_v &v)
 Returns the natural logarithm of v.
sfloat_v log2 (const sfloat_v &v)
 Returns the base-2 logarithm of v.
sfloat_v log10 (const sfloat_v &v)
 Returns the base-10 logarithm of v.
sfloat_v exp (const sfloat_v &v)
 Returns the exponential of v.
sfloat_v sin (const sfloat_v &v)
 Returns the sine of v.
sfloat_v cos (const sfloat_v &v)
 Returns the cosine of v.
void sincos (const sfloat_v &v, sfloat_v *sin, sfloat_v *cos)
 Calculates the sine and cosine of v.
sfloat_v asin (const sfloat_v &v)
 Returns the arcsine of v.
sfloat_v atan (const sfloat_v &v)
 Returns the arctangent of v.
sfloat_v atan2 (const sfloat_v &x, const sfloat_v &y)
 Returns the arctangent of x / y.
sfloat_v min (const sfloat_v &x, const sfloat_v &y)
 Returns the minimum of x and y.
sfloat_v max (const sfloat_v &x, const sfloat_v &y)
 Returns the maximum of x and y.
sfloat_v frexp (const sfloat_v &x, short_v *e)
 Convert floating-point number to fractional and integral components.
sfloat_v ldexp (sfloat_v x, short_v e)
 Multiply floating-point number by integral power of 2.
sfloat_m isfinite (const sfloat_v &x)
 Returns a mask that tells whether the values in the vector are finite (i.e. not NaN or +/-inf).
sfloat_m isnan (const sfloat_v &x)
 Returns a mask that tells whether the values in the vector are NaN.
void forceToRegisters (const vec &,...)
 Force the vectors passed to the function into registers.
const char * versionString ()
unsigned int versionNumber ()
template<typename V , typename M , typename A >
void deinterleave (V *a, V *b, const M *memory, A align)
template<typename T , Vc::MallocAlignment A>
T * malloc (size_t n)
 Allocates memory on the Heap with alignment and padding suitable for vectorized access.
template<typename T >
void free (T *p)
 Frees memory that was allocated with Vc::malloc.
void prefetchForOneRead (const void *addr)
 Prefetch the cacheline containing addr for a single read access.
void prefetchForModify (const void *addr)
 Prefetch the cacheline containing addr for modification.
void prefetchClose (const void *addr)
 Prefetch the cacheline containing addr to L1 cache.
void prefetchMid (const void *addr)
 Prefetch the cacheline containing addr to L2 cache.
void prefetchFar (const void *addr)
 Prefetch the cacheline containing addr to L3 cache.
Micro-Architecture Feature Tests
unsigned int extraInstructionsSupported ()
 Determines the extra instructions supported by the current CPU.
bool isImplementationSupported (Vc::Implementation impl)
 Tests whether the given implementation is supported by the system the code is executing on.
Vc::Implementation bestImplementationSupported ()
 Determines the best supported implementation for the current system.
bool currentImplementationSupported ()
 Tests that the CPU and Operating System support the vector unit which was compiled for.