Commit 61e059d3 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Revert "Use Vc::float_v::size() instead of Vc::float_v::Size"

This reverts commit 9f8b517f.
parent ef985d59
......@@ -227,7 +227,7 @@ QVector<Tile> generateTiles(int size,
QVector<Tile> tiles(size);
#ifdef HAVE_VC
const int vecSize = Vc::float_v::size();
const int vecSize = Vc::float_v::Size;
#else
const int vecSize = 1;
#endif
......@@ -472,7 +472,7 @@ void checkRounding(qreal opacity, qreal flow, qreal averageOpacity = -1, quint32
QVector<Tile> tiles =
generateTiles(2, 0, 0, ALPHA_RANDOM, ALPHA_RANDOM, pixelSize);
const int vecSize = Vc::float_v::size();
const int vecSize = Vc::float_v::Size;
const int numBlocks = numPixels / vecSize;
......@@ -810,7 +810,7 @@ void KisCompositionBenchmark::benchmarkMemcpy()
}
#ifdef HAVE_VC
const int vecSize = Vc::float_v::size();
const int vecSize = Vc::float_v::Size;
const size_t uint8VecAlignment = qMax(vecSize * sizeof(quint8), sizeof(void*));
const size_t uint32VecAlignment = qMax(vecSize * sizeof(quint32), sizeof(void*));
const size_t floatVecAlignment = qMax(vecSize * sizeof(float), sizeof(void*));
......@@ -835,7 +835,7 @@ void KisCompositionBenchmark::benchmarkUintFloat()
float *fData = (float*)ptr;
QBENCHMARK {
for (int i = 0; i < dataSize; i += Vc::float_v::size()) {
for (int i = 0; i < dataSize; i += Vc::float_v::Size) {
// convert uint -> float directly, this causes
// static_cast helper be called
Vc::float_v b(uint_v(iData + i));
......@@ -868,7 +868,7 @@ void KisCompositionBenchmark::benchmarkUintIntFloat()
float *fData = (float*)ptr;
QBENCHMARK {
for (int i = 0; i < dataSize; i += Vc::float_v::size()) {
for (int i = 0; i < dataSize; i += Vc::float_v::Size) {
// convert uint->int->float, that avoids special sign
// treating, and gives 2.6 times speedup
Vc::float_v b(int_v(uint_v(iData + i)));
......@@ -900,7 +900,7 @@ void KisCompositionBenchmark::benchmarkFloatUint()
float *fData = (float*)ptr;
QBENCHMARK {
for (int i = 0; i < dataSize; i += Vc::float_v::size()) {
for (int i = 0; i < dataSize; i += Vc::float_v::Size) {
// conversion float -> uint
uint_v b(Vc::float_v(fData + i));
......@@ -933,7 +933,7 @@ void KisCompositionBenchmark::benchmarkFloatIntUint()
float *fData = (float*)ptr;
QBENCHMARK {
for (int i = 0; i < dataSize; i += Vc::float_v::size()) {
for (int i = 0; i < dataSize; i += Vc::float_v::Size) {
// conversion float -> int -> uint
uint_v b(int_v(Vc::float_v(fData + i)));
......
......@@ -71,7 +71,7 @@ FastRowProcessor::process<Vc::CurrentImplementation::current()>(float* buffer, i
Vc::float_v currentIndices = Vc::float_v::IndexesFromZero();
Vc::float_v increment((float)Vc::float_v::size());
Vc::float_v increment((float)Vc::float_v::Size);
Vc::float_v vCenterX(centerX);
Vc::float_v vCosa(cosa);
......@@ -87,7 +87,7 @@ FastRowProcessor::process<Vc::CurrentImplementation::current()>(float* buffer, i
Vc::float_v vOne(Vc::One);
for (int i=0; i < width; i+= Vc::float_v::size()){
for (int i=0; i < width; i+= Vc::float_v::Size){
Vc::float_v x_ = currentIndices - vCenterX;
......@@ -130,7 +130,7 @@ FastRowProcessor::process<Vc::CurrentImplementation::current()>(float* buffer, i
currentIndices = currentIndices + increment;
bufferPointer += Vc::float_v::size();
bufferPointer += Vc::float_v::Size;
}
}
......
......@@ -110,8 +110,8 @@ void KisBrushMaskVectorApplicator<MaskGenerator, _impl>::processVector(const QRe
// We need to calculate with a multiple of the width of the simd register
int alignOffset = 0;
if (width % Vc::float_v::size() != 0) {
alignOffset = Vc::float_v::size() - (width % Vc::float_v::size());
if (width % Vc::float_v::Size != 0) {
alignOffset = Vc::float_v::Size - (width % Vc::float_v::Size);
}
int simdWidth = width + alignOffset;
......
......@@ -47,7 +47,7 @@ struct AlphaDarkenCompositor128 {
/**
* This is a vector equivalent of compositeOnePixelScalar(). It is considered
* to process Vc::float_v::size() pixels in a single pass.
* to process Vc::float_v::Size pixels in a single pass.
*
* o the \p haveMask parameter points whether the real (non-null) mask
* pointer is passed to the function.
......
......@@ -42,7 +42,7 @@ struct AlphaDarkenCompositor32 {
/**
* This is a vector equivalent of compositeOnePixelScalar(). It is considered
* to process Vc::float_v::size() pixels in a single pass.
* to process Vc::float_v::Size pixels in a single pass.
*
* o the \p haveMask parameter points whether the real (non-null) mask
* pointer is passed to the function.
......@@ -111,7 +111,7 @@ struct AlphaDarkenCompositor32 {
} else if (srcAlphaIsUnit) {
bool dstAlphaIsUnit = (dst_alpha == uint8Max).isFull();
if (dstAlphaIsUnit) {
memcpy(dst, src, 4 * Vc::float_v::size());
memcpy(dst, src, 4 * Vc::float_v::Size);
return;
} else {
dst_c1 = src_c1;
......
......@@ -109,7 +109,7 @@ struct OverCompositor32 {
} else {
if (!haveMask && !haveOpacity) {
memcpy(dst, src, 4 * Vc::float_v::size());
memcpy(dst, src, 4 * Vc::float_v::Size);
return;
} else {
// opacity has changed the alpha of the source,
......
......@@ -111,7 +111,7 @@ static inline quint8 lerp_mixed_u8_float(quint8 a, quint8 b, float alpha) {
}
/**
* Get a vector containing first Vc::float_v::size() values of mask.
* Get a vector containing first Vc::float_v::Size values of mask.
* Each source mask element is considered to be a 8-bit integer
*/
static inline Vc::float_v fetch_mask_8(const quint8 *data) {
......@@ -120,7 +120,7 @@ static inline Vc::float_v fetch_mask_8(const quint8 *data) {
}
/**
* Get an alpha values from Vc::float_v::size() pixels 32-bit each
* Get an alpha values from Vc::float_v::Size pixels 32-bit each
* (4 channels, 8 bit per channel). The alpha value is considered
* to be stored in the most significat byte of the pixel
*
......@@ -144,7 +144,7 @@ static inline Vc::float_v fetch_alpha_32(const quint8 *data) {
}
/**
* Get color values from Vc::float_v::size() pixels 32-bit each
* Get color values from Vc::float_v::Size pixels 32-bit each
* (4 channels, 8 bit per channel). The color data is considered
* to be stored in the 3 least significant bytes of the pixel.
*
......@@ -176,7 +176,7 @@ static inline void fetch_colors_32(const quint8 *data,
}
/**
* Pack color and alpha values to Vc::float_v::size() pixels 32-bit each
* Pack color and alpha values to Vc::float_v::Size pixels 32-bit each
* (4 channels, 8 bit per channel). The color data is considered
* to be stored in the 3 least significant bytes of the pixel, alpha -
* in the most significant byte
......@@ -218,7 +218,7 @@ template<bool useMask, bool useFlow, class Compositor, int pixelSize>
{
using namespace Arithmetic;
const int vectorSize = Vc::float_v::size();
const int vectorSize = Vc::float_v::Size;
const qint32 vectorInc = pixelSize * vectorSize;
const qint32 linearInc = pixelSize;
qint32 srcVectorInc = vectorInc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment