diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
commit | 311c175f3184103950c72bc5c775174597430b83 (patch) | |
tree | ad022dc44a1c4177b3d53bf0d7eaa5a1736c8cf1 /src/resources/dye | |
parent | 16bcb81b0509725e4546bcb3c390ca3c1bb7e7b1 (diff) | |
download | mv-311c175f3184103950c72bc5c775174597430b83.tar.gz mv-311c175f3184103950c72bc5c775174597430b83.tar.bz2 mv-311c175f3184103950c72bc5c775174597430b83.tar.xz mv-311c175f3184103950c72bc5c775174597430b83.zip |
Replace std::vector into macro STD_VECTOR.
In most case it equal to std::vector except debug modes.
Now it can be also mse::mstd::vector, but sadly this class not support
all required features.
Diffstat (limited to 'src/resources/dye')
-rw-r--r-- | src/resources/dye/dyepalette.h | 2 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_replaceacolor.cpp | 18 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_replaceaoglcolor.cpp | 22 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_replacescolor.cpp | 18 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_replacesoglcolor.cpp | 22 |
5 files changed, 41 insertions, 41 deletions
diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h index 95a26ca52..2db7bd13b 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -181,7 +181,7 @@ class DyePalette final #ifndef UNITTESTS private: #endif // UNITTESTS - std::vector<DyeColor> mColors; + STD_VECTOR<DyeColor> mColors; }; #endif // RESOURCES_DYE_DYEPALETTE_H diff --git a/src/resources/dye/dyepalette_replaceacolor.cpp b/src/resources/dye/dyepalette_replaceacolor.cpp index 27c0567cf..256efb8bb 100644 --- a/src/resources/dye/dyepalette_replaceacolor.cpp +++ b/src/resources/dye/dyepalette_replaceacolor.cpp @@ -39,7 +39,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceAColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -52,7 +52,7 @@ void DyePalette::replaceAColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -94,7 +94,7 @@ void DyePalette::replaceAColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -141,7 +141,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceAColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -156,7 +156,7 @@ void DyePalette::replaceAColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -182,7 +182,7 @@ void DyePalette::replaceAColorSse2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -212,7 +212,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceAColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -227,7 +227,7 @@ void DyePalette::replaceAColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -253,7 +253,7 @@ void DyePalette::replaceAColorAvx2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; diff --git a/src/resources/dye/dyepalette_replaceaoglcolor.cpp b/src/resources/dye/dyepalette_replaceaoglcolor.cpp index 69c3370a4..4d4588bb5 100644 --- a/src/resources/dye/dyepalette_replaceaoglcolor.cpp +++ b/src/resources/dye/dyepalette_replaceaoglcolor.cpp @@ -41,7 +41,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceAOGLColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -54,7 +54,7 @@ void DyePalette::replaceAOGLColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -96,7 +96,7 @@ void DyePalette::replaceAOGLColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -144,7 +144,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -160,7 +160,7 @@ void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -188,7 +188,7 @@ void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -230,7 +230,7 @@ void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -270,7 +270,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -286,7 +286,7 @@ void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -316,7 +316,7 @@ void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -358,7 +358,7 @@ void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; diff --git a/src/resources/dye/dyepalette_replacescolor.cpp b/src/resources/dye/dyepalette_replacescolor.cpp index 469d5507c..1d1c2676e 100644 --- a/src/resources/dye/dyepalette_replacescolor.cpp +++ b/src/resources/dye/dyepalette_replacescolor.cpp @@ -39,7 +39,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceSColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -57,7 +57,7 @@ void DyePalette::replaceSColorDefault(uint32_t *restrict pixels, const unsigned int data = pixels[ptr] & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -96,7 +96,7 @@ void DyePalette::replaceSColorDefault(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -139,7 +139,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -155,7 +155,7 @@ void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -187,7 +187,7 @@ void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, const unsigned int data = pixels[ptr] & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -220,7 +220,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -236,7 +236,7 @@ void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -268,7 +268,7 @@ void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, const unsigned int data = pixels[ptr] & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; diff --git a/src/resources/dye/dyepalette_replacesoglcolor.cpp b/src/resources/dye/dyepalette_replacesoglcolor.cpp index aaf05a66e..b5c2c621a 100644 --- a/src/resources/dye/dyepalette_replacesoglcolor.cpp +++ b/src/resources/dye/dyepalette_replacesoglcolor.cpp @@ -41,7 +41,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceSOGLColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -59,7 +59,7 @@ void DyePalette::replaceSOGLColorDefault(uint32_t *restrict pixels, const unsigned int data = (pixels[ptr]) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -101,7 +101,7 @@ void DyePalette::replaceSOGLColorDefault(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -144,7 +144,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -161,7 +161,7 @@ void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -195,7 +195,7 @@ void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, const unsigned int data = (pixels[ptr]) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -237,7 +237,7 @@ void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -272,7 +272,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -289,7 +289,7 @@ void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -325,7 +325,7 @@ void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, const unsigned int data = (pixels[ptr]) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -367,7 +367,7 @@ void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; |