Skip to content

Commit

Permalink
feat: http parse optimizations for armv8 (qicosmos#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
helintongh authored Sep 17, 2023
1 parent 803e030 commit 2e4288f
Show file tree
Hide file tree
Showing 8 changed files with 614 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ cinatra支持通过指令集优化其内部逻辑,其通过宏来控制是否
```shell
cmake -DENABLE_SIMD=SSE42 .. # 启用sse4.2指令集
cmake -DENABLE_SIMD=AVX2 .. # 启用avx2指令集
cmake -DENABLE_SIMD=AARCH64 .. # arm环境下,启用neon指令集
```

# 快速示例
Expand Down
2 changes: 1 addition & 1 deletion cmake/develop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ endif()
if(ENABLE_SIMD STREQUAL "SSE42" OR ENABLE_SIMD STREQUAL "AVX2" OR ENABLE_SIMD STREQUAL "AARCH64")
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
message(STATUS "Build with simd in aarch64")
add_definitions(-DCINATRA_AARCH64)
add_definitions(-DCINATRA_ARM_OPT)
elseif (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
message(STATUS "Build with simd in X86_64")
if (ENABLE_SIMD STREQUAL "SSE42")
Expand Down
4 changes: 3 additions & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ endif()

if (ENABLE_SIMD STREQUAL "AARCH64")
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
#TODO
add_library(neon INTERFACE IMPORTED)
target_compile_options(neon INTERFACE -march=armv8-a+fp+simd)
target_link_libraries(${project_name} neon)
endif ()
elseif (ENABLE_SIMD STREQUAL "SSE42")
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
Expand Down
Loading

0 comments on commit 2e4288f

Please sign in to comment.