aboutsummaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2017-09-22 11:54:55 -0700
committerFrank Barchard <fbarchard@google.com>2017-09-22 18:58:11 +0000
commit0b0a891cb29384bc8cd74df3019ff1b8d41d3e6a (patch)
tree5e444a0d5d19011a7e6e3096a8b5c9531e16de22 /BUILD.gn
parentefbf15754a1efb8e378b1873eb213d5c8931a3ba (diff)
downloadlibyuv-0b0a891cb29384bc8cd74df3019ff1b8d41d3e6a.tar.gz
Change TestScaleSumSamples_C test to allow for some float error in sum.
The sum of floats can optimize differently with vectorization, producing a different result between NEON and C. Adjust the unittest to allow for some difference in the sum. The NEON version is 8 samples at a time, so the test now rounds up the number of values to multiple of 8. TBR=kjellander@chromium.org Bug: libyuv:717 Test: LibYUVPlanarTest.TestScaleSumSamples_Opt Change-Id: I2a0783780c7e0f240f7a8e4700b2a4d3e6b52d87 Reviewed-on: https://chromium-review.googlesource.com/673708 Reviewed-by: Cheng Wang <wangcheng@google.com>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn3
1 files changed, 2 insertions, 1 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 34a9975b..b0c43725 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -160,7 +160,7 @@ static_library("libyuv_internal") {
# To enable AVX2 or other cpu optimization, pass flag here
# cflags = [ "-mavx2", "-mpopcnt", "-mavx2", "-mfma" ]
if (!is_win) {
- cflags = [ "-ffp-contract=fast" ] # Enable fma vectorization for NEON.
+ cflags = [ "-ffp-contract=fast" ] # Enable fma vectorization for NEON.
}
}
if (libyuv_use_neon) {
@@ -185,6 +185,7 @@ if (libyuv_use_neon) {
configs -= [ "//build/config/compiler:default_optimization" ]
# Enable optimize for speed (-O2) over size (-Os).
+ # TODO(fbarchard): Consider optimize_speed which is O3.
configs += [ "//build/config/compiler:optimize_max" ]
}