From 3a8e8c8f77c3f6e159c7cfc910b7cb4372c015d9 Mon Sep 17 00:00:00 2001 From: Takeshi YAMAMURO Date: Thu, 14 Apr 2016 14:02:34 +0900 Subject: [PATCH] Update README.md for showing how to enable SSE2/AVX2 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 977af0d..141e735 100755 --- a/README.md +++ b/README.md @@ -143,6 +143,12 @@ Older snapshots of snappy contain a buggy config.h.in that does not work properl $ export JAVA_HOME=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.2.10-1jpp.3.el7_0.s390x $ make USE_GIT=1 GIT_REPO_URL=https://github.com/google/snappy.git GIT_SNAPPY_BRANCH=master IBM_JDK_7=1 +## Activating SSE2/AVX2 instructions in BitShuffle + +The most of the native libraries that snappy-java contains disable SSE2/AVX2 instructions in terms of portability (SSE2 is enabled only in Linux/x86_64 platforms). To enable AVX2 instructions, you need to compile as follows: + + $ make CXXFLAGS_BITSHUFFLE=-mavx2 # -msse2 for SSE2 instructions + ## Cross-compiling for other platforms The Makefile contains rules for cross-compiling the native library for other platforms so that the snappy-java JAR can support multiple platforms. For example, to build the native libraries for x86 Linux, x86 and x86-64 Windows, and soft- and hard-float ARM: