Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsimd_p.h File Reference

(b911bb0d42622147c687a4856e29a34c22643bba)

#include <QtCore/private/qglobal_p.h>
#include <QtCore/qsimd.h>
#include <stdatomic.h>
+ Include dependency graph for qsimd_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length)    for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i)
 
#define ALIGNMENT_PROLOGUE_32BYTES(ptr, i, length)    for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((8 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x7)) & 0x7))); ++i)
 
#define SIMD_EPILOGUE(i, length, max)    for (int _i = 0; _i < max && i < length; ++i, ++_i)
 
#define QT_COMPILER_SUPPORTS(x)   (QT_COMPILER_SUPPORTS_ ## x - 0)
 
#define QT_COMPILER_SUPPORTS_HERE(x)   (__ ## x ## __)
 
#define QT_FUNCTION_TARGET(x)
 
#define Q_ATOMIC(T)   _Atomic(T)
 
#define qCpuHasFeature(feature)
 

Typedefs

typedef unsigned QCpuFeatureType
 

Enumerations

enum  CPUFeatures
 

Functions

Q_CORE_EXPORT Q_ATOMIC (QCpuFeatureType) QT_MANGLE_NAMESPACE(qt_cpu_features)[1]
 
Q_CORE_EXPORT uint64_t QT_MANGLE_NAMESPACE qDetectCpuFeatures ()
 
static uint64_t qCpuFeatures ()
 

Variables

static const uint64_t qCompilerCpuFeatures = 0
 

Macro Definition Documentation

◆ ALIGNMENT_PROLOGUE_16BYTES

#define ALIGNMENT_PROLOGUE_16BYTES ( ptr,
i,
length )    for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i)

Definition at line 27 of file qsimd_p.h.

◆ ALIGNMENT_PROLOGUE_32BYTES

#define ALIGNMENT_PROLOGUE_32BYTES ( ptr,
i,
length )    for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((8 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x7)) & 0x7))); ++i)

Definition at line 30 of file qsimd_p.h.

◆ Q_ATOMIC

#define Q_ATOMIC ( T)    _Atomic(T)

Definition at line 359 of file qsimd_p.h.

◆ qCpuHasFeature

#define qCpuHasFeature ( feature)
Value:
(((qCompilerCpuFeatures & CpuFeature ## feature) == CpuFeature ## feature) \
|| ((qCpuFeatures() & CpuFeature ## feature) == CpuFeature ## feature))
static const uint64_t qCompilerCpuFeatures
Definition qsimd_p.h:324
static uint64_t qCpuFeatures()
Definition qsimd_p.h:373

Definition at line 387 of file qsimd_p.h.

Referenced by QJpegHandler::QJpegHandler(), convert_generic(), convert_generic_inplace(), fetchARGBPMToARGB32PM(), fetchRGBToRGB32(), intermediate_adder(), QHash< Key, T >::qHash(), QHash< Key, T >::qHashBits(), qInitDrawhelperFunctions(), qInitFuncsAsm(), qInitImageConversions(), qt_memfill24(), qt_qimageScaleAARGB(), and qt_qimageScaleAARGBA().

◆ QT_COMPILER_SUPPORTS

#define QT_COMPILER_SUPPORTS ( x)    (QT_COMPILER_SUPPORTS_ ## x - 0)

Definition at line 100 of file qsimd_p.h.

◆ QT_COMPILER_SUPPORTS_HERE

#define QT_COMPILER_SUPPORTS_HERE ( x)    (__ ## x ## __)

Definition at line 132 of file qsimd_p.h.

◆ QT_FUNCTION_TARGET

#define QT_FUNCTION_TARGET ( x)

Definition at line 133 of file qsimd_p.h.

◆ SIMD_EPILOGUE

#define SIMD_EPILOGUE ( i,
length,
max )    for (int _i = 0; _i < max && i < length; ++i, ++_i)

Definition at line 33 of file qsimd_p.h.

Typedef Documentation

◆ QCpuFeatureType

typedef unsigned QCpuFeatureType

Definition at line 368 of file qsimd_p.h.

Enumeration Type Documentation

◆ CPUFeatures

Definition at line 311 of file qsimd_p.h.

Function Documentation

◆ Q_ATOMIC()

Q_CORE_EXPORT Q_ATOMIC ( QCpuFeatureType ) )[1]
extern

◆ qCpuFeatures()

static uint64_t qCpuFeatures ( )
inlinestatic

Definition at line 373 of file qsimd_p.h.

References Q_UNLIKELY, qCompilerCpuFeatures, qDetectCpuFeatures(), QT_MANGLE_NAMESPACE, and QT_SUPPORTS_INIT_PRIORITY.

+ Here is the call graph for this function:

◆ qDetectCpuFeatures()

Q_CORE_EXPORT uint64_t QT_MANGLE_NAMESPACE qDetectCpuFeatures ( )

Definition at line 561 of file qsimd.cpp.

References arraysize(), assert, detectProcessorFeatures(), features_indices, features_string, i, minFeature, Q_UINT64_C, Q_UNLIKELY, qAbort(), QT_MANGLE_NAMESPACE, SimdInitialized, str, and token.

Referenced by qCpuFeatures().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ qCompilerCpuFeatures

const uint64_t qCompilerCpuFeatures = 0
static

Definition at line 324 of file qsimd_p.h.

Referenced by qCpuFeatures(), and qDumpCPUFeatures().