Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,22 @@ cc_library(
local_defines = ["HWY_HEADER_ONLY"],
)

cc_library(
name = "intdiv",
compatible_with = [],
copts = COPTS,
hdrs = [
"hwy/contrib/intdiv/intdiv.h",
],
textual_hdrs = [
"hwy/contrib/intdiv/intdiv-inl.h",
],
deps = [
":hwy",
],
)


cc_test(
name = "list_targets",
size = "small",
Expand Down Expand Up @@ -592,6 +608,17 @@ HWY_TEST_DEPS = [
for subdir, test, extra_deps in HWY_TESTS
]

cc_test(
name = "intdiv_test",
size = "medium",
timeout = "long",
srcs = ["hwy/contrib/intdiv/intdiv_test.cc"],
copts = COPTS + HWY_TEST_COPTS,
local_defines = ["HWY_IS_TEST"],
tags = ["hwy_ops_test"],
deps = HWY_TEST_DEPS + [":intdiv"],
)

# For manually building the tests we define here (:all does not work in --config=msvc)
test_suite(
name = "hwy_ops_tests",
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ list(APPEND HWY_CONTRIB_SOURCES
hwy/contrib/image/image.cc
hwy/contrib/image/image.h
hwy/contrib/math/fast_math-inl.h
hwy/contrib/intdiv/intdiv.h
hwy/contrib/intdiv/intdiv-inl.h
hwy/contrib/math/math-inl.h
hwy/contrib/matvec/matvec-inl.h
hwy/contrib/random/random-inl.h
Expand Down Expand Up @@ -881,6 +883,7 @@ list(APPEND HWY_TEST_FILES
hwy/contrib/bit_pack/bit_pack_test.cc
hwy/contrib/dot/dot_test.cc
hwy/contrib/matvec/matvec_test.cc
hwy/contrib/intdiv/intdiv_test.cc
hwy/contrib/image/image_test.cc
# Disabled due to SIGILL in clang7 debug build during gtest discovery phase,
# not reproducible locally. Still tested via bazel build.
Expand Down
2 changes: 2 additions & 0 deletions hwy.gni
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ hwy_contrib_public = [
"$_hwy/contrib/dot/dot-inl.h",
"$_hwy/contrib/image/image.h",
"$_hwy/contrib/math/fast_math-inl.h",
"$_hwy/contrib/intdiv/intdiv.h",
"$_hwy/contrib/intdiv/intdiv-inl.h",
"$_hwy/contrib/math/math-inl.h",
]

Expand Down
Loading
Loading