Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b7951348
Commit
b7951348
authored
Aug 14, 2018
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-16859 MyRocks: support SSE42 CRC32-C instruction.
parent
964ad0c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
storage/rocksdb/build_rocksdb.cmake
storage/rocksdb/build_rocksdb.cmake
+24
-2
No files found.
storage/rocksdb/build_rocksdb.cmake
View file @
b7951348
...
...
@@ -376,9 +376,31 @@ SET(SOURCES)
FOREACH
(
s
${
ROCKSDB_SOURCES
}
)
list
(
APPEND SOURCES
${
ROCKSDB_SOURCE_DIR
}
/
${
s
}
)
ENDFOREACH
()
IF
(
MSVC
)
if
(
MSVC
)
add_definitions
(
-DHAVE_SSE42 -DHAVE_PCLMUL
)
ENDIF
()
else
()
set
(
CMAKE_REQUIRED_FLAGS
"-msse4.2 -mpclmul
${
CXX11_FLAGS
}
"
)
CHECK_CXX_SOURCE_COMPILES
(
"
#include <cstdint>
#include <nmmintrin.h>
#include <wmmintrin.h>
int main() {
volatile uint32_t x = _mm_crc32_u32(0, 0);
const auto a = _mm_set_epi64x(0, 0);
const auto b = _mm_set_epi64x(0, 0);
const auto c = _mm_clmulepi64_si128(a, b, 0x00);
auto d = _mm_cvtsi128_si64(c);
}
"
HAVE_SSE42
)
if
(
HAVE_SSE42
)
set_source_files_properties
(
${
ROCKSDB_SOURCE_DIR
}
/util/crc32c.cc
PROPERTIES COMPILE_FLAGS
"-DHAVE_SSE42 -DHAVE_PCLMUL -msse4.2 -mpclmul"
)
endif
()
unset
(
CMAKE_REQUIRED_FLAGS
)
endif
()
IF
(
CMAKE_VERSION VERSION_GREATER
"2.8.10"
)
STRING
(
TIMESTAMP GIT_DATE_TIME
"%Y-%m-%d %H:%M:%S"
)
ENDIF
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment