Skip to content

Commit

Permalink
Enable avx512
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Jun 17, 2024
1 parent 50bea67 commit 0e9ea0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
16 changes: 2 additions & 14 deletions CMake/resolve_dependency_modules/hyperscan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,7 @@ set(CMAKE_CXX_STANDARD_BACKUP ${CMAKE_CXX_STANDARD})
# C++ 17 is not supported.
set(CMAKE_CXX_STANDARD 11)
set(BUILD_EXAMPLES FALSE)
#set(BUILD_AVX512 ON)
set(BUILD_AVX512 ON)
FetchContent_MakeAvailable(hyperscan)
set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD_BACKUP})
# if(ICU_SOURCE)
# # empty var will cause a syntax error
# if(${ICU_SOURCE} STREQUAL "BUNDLED")
# # build re2 after icu so the files are available
# add_dependencies(re2 ICU ICU::uc)
# endif()
# endif()

# set(re2_LIBRARIES ${re2_BINARY_DIR}/libre2.a)
# set(re2_INCLUDE_DIRS ${re2_SOURCE_DIR})

# set(RE2_ROOT ${re2_BINARY_DIR})
# set(re2_ROOT ${re2_BINARY_DIR})
# TODO: Build and install colm, ragel before hyperscan.
7 changes: 2 additions & 5 deletions velox/functions/lib/HyperscanFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ class MatchConstantPattern final : public exec::VectorFunction {
}

/**
* This is the function that will be called for each match that occurs. @a ctx
* is to allow you to have some application-specific state that you will get
* access to for each match. In our simple example we're just going to use it
* to pass in the pattern that was being searched for so we can print it out.
* Callback function for matching case.
*/
static int eventHandler(
unsigned int id,
Expand Down Expand Up @@ -135,4 +132,4 @@ std::shared_ptr<exec::VectorFunction> makeHyperscanMatch(
VELOX_UNREACHABLE();
}

} // namespace facebook::velox::functions
} // namespace facebook::velox::functions
2 changes: 1 addition & 1 deletion velox/functions/lib/HyperscanFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ std::shared_ptr<exec::VectorFunction> makeHyperscanMatch(
const std::vector<exec::VectorFunctionArg>& inputArgs,
const core::QueryConfig& config);

}
}

0 comments on commit 0e9ea0c

Please sign in to comment.