diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp b/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp index 4e37ab6fefa..211e495ca1f 100644 --- a/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +++ b/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp @@ -35,7 +35,7 @@ #include <Accelerate/Accelerate.h> #endif -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) #include <emmintrin.h> #endif @@ -125,7 +125,7 @@ void vsma(const float* sourceP, int sourceStride, const float* scale, float* des { int n = framesToProcess; -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) if ((sourceStride == 1) && (destStride == 1)) { float k = *scale; @@ -198,7 +198,7 @@ void vsmul(const float* sourceP, int sourceStride, const float* scale, float* de { int n = framesToProcess; -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) if ((sourceStride == 1) && (destStride == 1)) { float k = *scale; @@ -269,7 +269,7 @@ void vsmul(const float* sourceP, int sourceStride, const float* scale, float* de sourceP += sourceStride; destP += destStride; } -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) } #endif } @@ -278,7 +278,7 @@ void vadd(const float* source1P, int sourceStride1, const float* source2P, int s { int n = framesToProcess; -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) if ((sourceStride1 ==1) && (sourceStride2 == 1) && (destStride == 1)) { // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast<size_t>(source1P) & 0x0F) && n) { @@ -381,7 +381,7 @@ void vadd(const float* source1P, int sourceStride1, const float* source2P, int s source2P += sourceStride2; destP += destStride; } -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) } #endif } @@ -391,7 +391,7 @@ void vmul(const float* source1P, int sourceStride1, const float* source2P, int s int n = framesToProcess; -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { // If the source1P address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast<uintptr_t>(source1P) & 0x0F) && n) { @@ -464,7 +464,7 @@ void vmul(const float* source1P, int sourceStride1, const float* source2P, int s void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess) { unsigned i = 0; -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) // Only use the SSE optimization in the very common case that all addresses are 16-byte aligned. // Otherwise, fall through to the scalar code below. if (!(reinterpret_cast<uintptr_t>(real1P) & 0x0F) @@ -522,7 +522,7 @@ void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesTo int n = framesToProcess; float sum = 0; -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) if (sourceStride == 1) { // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast<uintptr_t>(sourceP) & 0x0F) && n) { @@ -587,7 +587,7 @@ void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesT int n = framesToProcess; float max = 0; -#ifdef __SSE2__ +#if CPU(X86) || CPU(X86_64) if (sourceStride == 1) { // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast<uintptr_t>(sourceP) & 0x0F) && n) { |