• Frank Barchard's avatar
    document cpuid command line behavior · e2611a73
    Frank Barchard authored
    cpu_info_ is zero for uninitialized state and all bits are off, disabling all cpu optimizations.
    the 1 bit indicates cpu_info_ is initialized avoiding calling the detection code again for performance.
    
    MaskCpuFlags initializes the cpu ignoring existing flags, then masks with the supplied flags and stores to cpu_info_.
    As a mask, -1 has no effect, enabling all cpu features that were detected, but nothing that wasnt detected.
    Setting to 0 will cause the next call to re-initialize the cpu, which is same as enabling all features.
    Setting mask to 1 will turn off all cpu features but keep the initialized bit on, so the next detection call wont reinitialize and the cpu features are all disabled.
    
    So normal behavior for command line and programatic masking is:
    1 = C
    -1 = SIMD
    
    TBR=harryjin@google.com
    BUG=libyuv:600
    TESTED=out64/Release/bin/run_libyuv_unittest -s libyuv_unittest --verbose --release --gtest_filter=*ARGBExtractAlpha* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=9999 --libyuv_flags=1 --libyuv_cpu_info=1"
    
    Review URL: https://codereview.chromium.org/2042933002 .
    e2611a73
Name
Last commit
Last update
build_overrides Loading commit data...
chromium Loading commit data...
docs Loading commit data...
include Loading commit data...
source Loading commit data...
third_party/gflags Loading commit data...
tools Loading commit data...
unit_test Loading commit data...
util Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
AUTHORS Loading commit data...
Android.mk Loading commit data...
BUILD.gn Loading commit data...
CMakeLists.txt Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE_THIRD_PARTY Loading commit data...
OWNERS Loading commit data...
PATENTS Loading commit data...
PRESUBMIT.py Loading commit data...
README.chromium Loading commit data...
README.md Loading commit data...
all.gyp Loading commit data...
codereview.settings Loading commit data...
download_vs_toolchain.py Loading commit data...
gyp_libyuv Loading commit data...
gyp_libyuv.py Loading commit data...
libyuv.gyp Loading commit data...
libyuv.gypi Loading commit data...
libyuv_nacl.gyp Loading commit data...
libyuv_test.gyp Loading commit data...
linux.mk Loading commit data...
public.mk Loading commit data...
setup_links.py Loading commit data...
sync_chromium.py Loading commit data...
winarm.mk Loading commit data...