ROOT
6.07/01
Reference Guide
|
Namespaces | |
AVX | |
Common | |
Error | |
Internal | |
Mem | |
Reg | |
Scalar | |
SSE | |
VC__USE_NAMESPACE | |
VectorSpecialInitializerIndexesFromZero | |
VectorSpecialInitializerOne | |
VectorSpecialInitializerZero | |
Warnings | |
Classes | |
struct | _MemorySizeCalculation |
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 | MemoryDimensionBase |
class | MemoryDimensionBase< V, Parent, 1, RowMemory > |
class | MemoryDimensionBase< V, Parent, 2, RowMemory > |
class | MemoryBase |
Common interface to all Memory classes, independent of allocation on the stack or heap. More... | |
class | Operand |
class | BinaryOperation |
struct | Trigonometric |
struct | sfloat |
struct | DetermineEntryType |
struct | DetermineEntryType< sfloat > |
struct | NegateTypeHelper |
struct | NegateTypeHelper< unsigned char > |
struct | NegateTypeHelper< unsigned short > |
struct | NegateTypeHelper< unsigned int > |
class | CpuId |
This class is available for x86 / AMD64 systems to read and interpret information about the CPU's capabilities. More... | |
struct | ImplementationT |
struct | Math |
struct | Math< float > |
struct | Math< double > |
Typedefs | |
typedef ImplementationT< VC_IMPL > | CurrentImplementation |
typedef VectorAlignedBaseT | VectorAlignedBase |
typedef VECTOR_NAMESPACE::double_v | double_v |
typedef double_v::Mask | double_m |
typedef VECTOR_NAMESPACE::sfloat_v | sfloat_v |
typedef sfloat_v::Mask | sfloat_m |
typedef VECTOR_NAMESPACE::float_v | float_v |
typedef float_v::Mask | float_m |
typedef VECTOR_NAMESPACE::int_v | int_v |
typedef int_v::Mask | int_m |
typedef VECTOR_NAMESPACE::uint_v | uint_v |
typedef uint_v::Mask | uint_m |
typedef VECTOR_NAMESPACE::short_v | short_v |
typedef short_v::Mask | short_m |
typedef VECTOR_NAMESPACE::ushort_v | ushort_v |
typedef ushort_v::Mask | ushort_m |
Enumerations | |
enum | BinaryOperation { AddOp, SubOp, MulOp, DivOp } |
enum | AlignedFlag { Aligned = 0 } |
enum | UnalignedFlag { Unaligned = 1 } |
enum | StreamingAndAlignedFlag { Streaming = 2 } |
enum | StreamingAndUnalignedFlag { StreamingAndUnaligned = 3 } |
enum | MallocAlignment { AlignOnVector, AlignOnCacheline, AlignOnPage } |
Enum that specifies the alignment and padding restrictions to use for memory allocation with Vc::malloc. More... | |
enum | Implementation { ScalarImpl, SSE2Impl, SSE3Impl, SSSE3Impl, SSE41Impl, SSE42Impl, AVXImpl, AVX2Impl, ImplementationMask = 0xfff } |
Enum to identify a certain SIMD instruction set. More... | |
enum | ExtraInstructions { Float16cInstructions = 0x01000, Fma4Instructions = 0x02000, XopInstructions = 0x04000, PopcntInstructions = 0x08000, Sse4aInstructions = 0x10000, FmaInstructions = 0x20000, ExtraInstructionsMask = 0xfffff000u } |
The list of available instructions is not easily described by a linear list of instruction sets. More... | |
enum | VecPos { X0, X1, X2, X3, X4, X5, X6, X7, Y0, Y1, Y2, Y3, Y4, Y5, Y6, Y7 } |
Functions | |
template<typename V , typename M , typename A > | |
Vc_ALWAYS_INLINE void | deinterleave (V *a, V *b, const M *memory, A align) |
Loads two vectors of values from an interleaved array. More... | |
template<typename V , typename M > | |
Vc_ALWAYS_INLINE void | deinterleave (V *a, V *b, const M *memory) |
template<typename T > | |
static Vc_ALWAYS_INLINE Vector< T > | iif (typename Vector< T >::Mask condition, Vector< T > trueValue, Vector< T > falseValue) |
Function to mimic the ternary operator '?:'. More... | |
template<typename T , Vc::MallocAlignment A> | |
Vc_ALWAYS_INLINE_L T *Vc_ALWAYS_INLINE_R | malloc (size_t n) |
Allocates memory on the Heap with alignment and padding suitable for vectorized access. More... | |
template<typename T > | |
Vc_ALWAYS_INLINE void | free (T *p) |
Frees memory that was allocated with Vc::malloc. More... | |
Vc_ALWAYS_INLINE void | prefetchForOneRead (const void *addr) |
Prefetch the cacheline containing addr for a single read access. More... | |
Vc_ALWAYS_INLINE void | prefetchForModify (const void *addr) |
Prefetch the cacheline containing addr for modification. More... | |
Vc_ALWAYS_INLINE void | prefetchClose (const void *addr) |
Prefetch the cacheline containing addr to L1 cache. More... | |
Vc_ALWAYS_INLINE void | prefetchMid (const void *addr) |
Prefetch the cacheline containing addr to L2 cache. More... | |
Vc_ALWAYS_INLINE void | prefetchFar (const void *addr) |
Prefetch the cacheline containing addr to L3 cache. More... | |
template<typename _T > | |
static Vc_ALWAYS_INLINE void | assertCorrectAlignment (const _T *) |
Vc_CONSTEXPR StreamingAndUnalignedFlag | operator| (UnalignedFlag, StreamingAndAlignedFlag) |
Vc_CONSTEXPR StreamingAndUnalignedFlag | operator| (StreamingAndAlignedFlag, UnalignedFlag) |
Vc_CONSTEXPR StreamingAndUnalignedFlag | operator& (UnalignedFlag, StreamingAndAlignedFlag) |
Vc_CONSTEXPR StreamingAndUnalignedFlag | operator& (StreamingAndAlignedFlag, UnalignedFlag) |
Vc_CONSTEXPR StreamingAndAlignedFlag | operator| (AlignedFlag, StreamingAndAlignedFlag) |
Vc_CONSTEXPR StreamingAndAlignedFlag | operator| (StreamingAndAlignedFlag, AlignedFlag) |
Vc_CONSTEXPR StreamingAndAlignedFlag | operator& (AlignedFlag, StreamingAndAlignedFlag) |
Vc_CONSTEXPR StreamingAndAlignedFlag | operator& (StreamingAndAlignedFlag, AlignedFlag) |
static const char * | versionString () |
static unsigned int | versionNumber () |
void | checkLibraryAbi (unsigned int compileTimeAbi, unsigned int versionNumber, const char *versionString) |
V_ALIGN (64) unsigned int RandomState[16] | |
static unsigned int | CpuIdAmdAssociativityTable (int bits) |
static VC_TARGET_NO_SIMD bool | xgetbvCheck (unsigned int bits) |
Micro-Architecture Feature Tests | |
VC_TARGET_NO_SIMD unsigned int | extraInstructionsSupported () |
Determines the extra instructions supported by the current CPU. More... | |
VC_TARGET_NO_SIMD bool | isImplementationSupported (Vc::Implementation impl) |
Tests whether the given implementation is supported by the system the code is executing on. More... | |
template<typename Impl > | |
static VC_TARGET_NO_SIMD bool | isImplementationSupported () |
VC_TARGET_NO_SIMD Vc::Implementation | bestImplementationSupported () |
Determines the best supported implementation for the current system. More... | |
static VC_TARGET_NO_SIMD bool | currentImplementationSupported () |
Tests that the CPU and Operating System support the vector unit which was compiled for. More... | |
Variables | |
const char | LIBRARY_VERSION [] = VC_VERSION_STRING |
const unsigned int | LIBRARY_VERSION_NUMBER = VC_VERSION_NUMBER |
const unsigned int | LIBRARY_ABI_VERSION = VC_LIBRARY_ABI_VERSION |
typedef double_v::Mask ROOT::Vc::double_m |
typedef VECTOR_NAMESPACE::double_v ROOT::Vc::double_v |
typedef float_v::Mask ROOT::Vc::float_m |
typedef VECTOR_NAMESPACE::float_v ROOT::Vc::float_v |
typedef int_v::Mask ROOT::Vc::int_m |
typedef VECTOR_NAMESPACE::int_v ROOT::Vc::int_v |
typedef sfloat_v::Mask ROOT::Vc::sfloat_m |
typedef VECTOR_NAMESPACE::sfloat_v ROOT::Vc::sfloat_v |
typedef short_v::Mask ROOT::Vc::short_m |
typedef VECTOR_NAMESPACE::short_v ROOT::Vc::short_v |
typedef uint_v::Mask ROOT::Vc::uint_m |
typedef VECTOR_NAMESPACE::uint_v ROOT::Vc::uint_v |
typedef ushort_v::Mask ROOT::Vc::ushort_m |
typedef VECTOR_NAMESPACE::ushort_v ROOT::Vc::ushort_v |
typedef VectorAlignedBaseT ROOT::Vc::VectorAlignedBase |
The list of available instructions is not easily described by a linear list of instruction sets.
On x86 the following instruction sets always include their predecessors: SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2
But there are additional instructions that are not necessarily required by this list. These are covered in this enum.
Enum to identify a certain SIMD instruction set.
You can use VC_IMPL for the currently active implementation.
Enumerator | |
---|---|
ScalarImpl |
uses only fundamental types |
SSE2Impl |
x86 SSE + SSE2 |
SSE3Impl |
x86 SSE + SSE2 + SSE3 |
SSSE3Impl |
x86 SSE + SSE2 + SSE3 + SSSE3 |
SSE41Impl |
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1 |
SSE42Impl |
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1 + SSE4.2 |
AVXImpl |
x86 AVX |
AVX2Impl |
x86 AVX + AVX2 |
ImplementationMask |
Enum that specifies the alignment and padding restrictions to use for memory allocation with Vc::malloc.
Enumerator | |
---|---|
AlignOnVector |
Align on boundary of vector sizes (e.g. 16 Bytes on SSE platforms) and pad to allow vector access to the end. Thus the allocated memory contains a multiple of VectorAlignment bytes. |
AlignOnCacheline |
Align on boundary of cache line sizes (e.g. 64 Bytes on x86) and pad to allow full cache line access to the end. Thus the allocated memory contains a multiple of 64 bytes. |
AlignOnPage |
Align on boundary of page sizes (e.g. 4096 Bytes on x86) and pad to allow full page access to the end. Thus the allocated memory contains a multiple of 4096 bytes. |
enum ROOT::Vc::VecPos |
|
static |
Definition at line 210 of file types.h.
Referenced by ROOT::Vc::Common::VectorMemoryUnion< VectorType, EntryType >::VectorMemoryUnion().
VC_TARGET_NO_SIMD Vc::Implementation ROOT::Vc::bestImplementationSupported | ( | ) |
Determines the best supported implementation for the current system.
Definition at line 83 of file support.cpp.
void ROOT::Vc::checkLibraryAbi | ( | unsigned int | compileTimeAbi, |
unsigned int | versionNumber, | ||
const char * | versionString | ||
) |
|
static |
Definition at line 101 of file cpuid.cpp.
Referenced by ROOT::Vc::CpuId::init().
|
inlinestatic |
Tests that the CPU and Operating System support the vector unit which was compiled for.
This function should be called before any other Vc functionality is used. It checks whether the program will work. If this function returns false
then the program should exit with a useful error message before the OS has to kill it because of an invalid instruction exception.
If the program continues and makes use of any vector features not supported by hard- or software then the program will crash.
Example:
true
if the OS and hardware support execution of the currently selected SIMD instructions. false
otherwise Definition at line 138 of file support.h.
Referenced by _UnitTest_verify_vector_unit_supported(), and testCompiledImplementation().
Vc_ALWAYS_INLINE void ROOT::Vc::deinterleave | ( | V * | a, |
V * | b, | ||
const M * | memory, | ||
A | align | ||
) |
Loads two vectors of values from an interleaved array.
a,b | The vectors to load the values from memory into. |
memory | The memory location where to read the next 2 * V::Size values from |
align | Either pass Vc::Aligned or Vc::Unaligned. It defaults to Vc::Aligned if nothing is specified. |
If you store your data as
then the deinterleave function allows you to read Size
concurrent x and y values like this:
This code will load m[10], m[12], m[14], ... into x
and m[11], m[13], m[15], ... into y
.
The deinterleave function supports the following type combinations:
V \ M | float | double | ushort | short | uint | int =========|=======|========|========|=======|======|===== float_v | X | | X | X | | ---------|-------|--------|--------|-------|------|----- sfloat_v | X | | X | X | | ---------|-------|--------|--------|-------|------|----- double_v | | X | | | | ---------|-------|--------|--------|-------|------|----- int_v | | | | X | | X ---------|-------|--------|--------|-------|------|----- uint_v | | | X | | X | ---------|-------|--------|--------|-------|------|----- short_v | | | | X | | ---------|-------|--------|--------|-------|------|----- ushort_v | | | X | | |
Definition at line 69 of file deinterleave.h.
Referenced by testDeinterleave().
Vc_ALWAYS_INLINE void ROOT::Vc::deinterleave | ( | V * | a, |
V * | b, | ||
const M * | memory | ||
) |
Definition at line 76 of file deinterleave.h.
Referenced by deinterleave().
VC_TARGET_NO_SIMD unsigned int ROOT::Vc::extraInstructionsSupported | ( | ) |
Determines the extra instructions supported by the current CPU.
Definition at line 99 of file support.cpp.
Referenced by isImplementationSupported(), and testExtraInstructions().
Vc_ALWAYS_INLINE void ROOT::Vc::free | ( | T * | p | ) |
Frees memory that was allocated with Vc::malloc.
p | The pointer to the memory to be freed. |
T | The type of the allocated memory. |
Definition at line 94 of file memory.h.
Referenced by ROOT::Vc::Memory< V, 0u, 0u >::~Memory().
|
static |
Function to mimic the ternary operator '?:'.
condition | Determines which values are returned. This is analog to the first argument to the ternary operator. |
trueValue | The values to return where condition is true . |
falseValue | The values to return where condition is false . |
trueValue
and falseValue
, according to condition
.So instead of the scalar variant
you'd write
VC_TARGET_NO_SIMD bool ROOT::Vc::isImplementationSupported | ( | Vc::Implementation | impl | ) |
Tests whether the given implementation is supported by the system the code is executing on.
true
if the OS and hardware support execution of instructions defined by impl
. false
otherwiseimpl | The SIMD target to test for. |
Definition at line 55 of file support.cpp.
Referenced by isImplementationSupported(), and testIsSupported().
|
inlinestatic |
Vc_ALWAYS_INLINE_L T* Vc_ALWAYS_INLINE_R ROOT::Vc::malloc | ( | size_t | n | ) |
Allocates memory on the Heap with alignment and padding suitable for vectorized access.
Memory that was allocated with this function must be released with Vc::free! Other methods might work but are not portable.
n | Specifies the number of objects the allocated memory must be able to store. |
T | The type of the allocated memory. Note, that the constructor is not called. |
A | Determines the alignment of the memory. See Vc::MallocAlignment. |
A
. Thus if you request memory for 21 int objects, aligned via Vc::AlignOnCacheline, you can safely read a full cacheline until the end of the array, without generating an out-of-bounds access. For a cacheline size of 64 Bytes and an int size of 4 Bytes you would thus get an array of 128 Bytes to work with.Definition at line 67 of file memory.h.
Referenced by alloc_vprintf(), alloc_vprintf2(), Cppyy::Allocate(), ROOT::Minuit2::StackAllocator::Allocate(), TXMLEngine::AllocateAttr(), TXMLEngine::AllocateNode(), Memstat::TMemStatMng::AllocHook(), XrdProofConn::Authenticate(), begin_request_handler(), TODBCStatement::BindColumn(), TODBCStatement::BindParam(), Cppyy::CallO(), THttpCallArg::CompressWithGzip(), TCivetweb::Create(), TTable::Create(), TX11GLManager::CreateGLPixmap(), TClassEdit::DemangleName(), ROOT::Math::Delaunay2D::DoFindTriangles(), BidirMMapPipe_impl::PageChunk::dommap(), drr_func_cache_init(), drr_func_cache_push(), drr_method_missing(), TStorage::EnterStat(), XrdProofdAux::Expand(), TOracleStatement::GetBinary(), TUUID::GetNodeIdentifier(), TGWin32::GetProperty(), GIFquantize(), gl2psMalloc(), gsl_integration_workspace_alloc(), handle_cgi_request(), mg_set_request_handler(), mg_strndup(), my_strdup(), TASImage::operator=(), TXSocket::PopUpSpare(), TRootSniffer::ProduceBinary(), TRootSniffer::ProduceExe(), TRootSniffer::ProduceImage(), TRootSniffer::ProduceMulti(), ROOT::R::R_completion_generator(), XrdProofdNetMgr::ReadBufferLocal(), TRFIOFile::ReadBuffers(), TDCacheFile::ReadBuffers(), THttpServer::ReadFileContent(), TGX11TTF::RenderString(), rng_alloc(), rr_register_ctf1_fcn(), rr_register_ctf2_fcn(), TFastCgi::run_func(), TMonaLisaWriter::SendParameters(), set_ssl_option(), TGWin32::SetClassHints(), SubdivColorMap(), TASImage::TASImage(), trimalloc(), TGenCollectionProxy::TStaging::TStaging(), XrdSrvBuffer::XrdSrvBuffer(), XRotCreateTextItem(), XRotPaintAlignedString(), and XRotTextExtents().
Vc_CONSTEXPR StreamingAndUnalignedFlag ROOT::Vc::operator& | ( | UnalignedFlag | , |
StreamingAndAlignedFlag | |||
) |
Vc_CONSTEXPR StreamingAndUnalignedFlag ROOT::Vc::operator& | ( | StreamingAndAlignedFlag | , |
UnalignedFlag | |||
) |
Vc_CONSTEXPR StreamingAndAlignedFlag ROOT::Vc::operator& | ( | AlignedFlag | , |
StreamingAndAlignedFlag | |||
) |
Vc_CONSTEXPR StreamingAndAlignedFlag ROOT::Vc::operator& | ( | StreamingAndAlignedFlag | , |
AlignedFlag | |||
) |
Vc_CONSTEXPR StreamingAndUnalignedFlag ROOT::Vc::operator| | ( | UnalignedFlag | , |
StreamingAndAlignedFlag | |||
) |
Vc_CONSTEXPR StreamingAndUnalignedFlag ROOT::Vc::operator| | ( | StreamingAndAlignedFlag | , |
UnalignedFlag | |||
) |
Vc_CONSTEXPR StreamingAndAlignedFlag ROOT::Vc::operator| | ( | AlignedFlag | , |
StreamingAndAlignedFlag | |||
) |
Vc_CONSTEXPR StreamingAndAlignedFlag ROOT::Vc::operator| | ( | StreamingAndAlignedFlag | , |
AlignedFlag | |||
) |
Vc_ALWAYS_INLINE void ROOT::Vc::prefetchClose | ( | const void * | addr | ) |
Vc_ALWAYS_INLINE void ROOT::Vc::prefetchFar | ( | const void * | addr | ) |
Vc_ALWAYS_INLINE void ROOT::Vc::prefetchForModify | ( | const void * | addr | ) |
Prefetch the cacheline containing addr
for modification.
This prefetch evicts data from the cache. So use it only for data you really will use. When the target system supports it the cacheline will be marked as modified while prefetching, saving work later on.
addr | The cacheline containing addr will be prefetched. |
Vc_ALWAYS_INLINE void ROOT::Vc::prefetchForOneRead | ( | const void * | addr | ) |
Vc_ALWAYS_INLINE void ROOT::Vc::prefetchMid | ( | const void * | addr | ) |
ROOT::Vc::V_ALIGN | ( | 64 | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 39 of file support.cpp.
Referenced by bestImplementationSupported(), and isImplementationSupported().
const unsigned int ROOT::Vc::LIBRARY_ABI_VERSION = VC_LIBRARY_ABI_VERSION |
Definition at line 517 of file const.cpp.
Referenced by checkLibraryAbi().
const char ROOT::Vc::LIBRARY_VERSION[] = VC_VERSION_STRING |
Definition at line 515 of file const.cpp.
Referenced by checkLibraryAbi().
const unsigned int ROOT::Vc::LIBRARY_VERSION_NUMBER = VC_VERSION_NUMBER |
Definition at line 516 of file const.cpp.
Referenced by checkLibraryAbi().