load("@fbsource//tools/build_defs/dirsync:fb_dirsync_cpp_library.bzl", "fb_dirsync_cpp_library")
load("@fbsource//xplat/pfh/triage_InfrastructureSupermoduleOptou:DEFS.bzl", "triage_InfrastructureSupermoduleOptou")
load(
    "../../../defs.bzl",
    "folly_xplat_library",
)

oncall("fbcode_entropy_wardens_folly")

fb_dirsync_cpp_library(
    name = "simd_any_of",
    headers = ["SimdAnyOf.h"],
    feature = triage_InfrastructureSupermoduleOptou,
    use_raw_headers = True,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        ":simd_for_each",
        ":unroll_utils",
        "//folly:c_portability",
    ],
)

fb_dirsync_cpp_library(
    name = "simd_platform",
    headers = ["SimdPlatform.h"],
    feature = triage_InfrastructureSupermoduleOptou,
    use_raw_headers = True,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        "//folly:portability",
        "//folly/algorithm/simd:ignore",
        "//folly/algorithm/simd:movemask",
        "//folly/lang:safe_assert",
    ],
)

fb_dirsync_cpp_library(
    name = "simd_contains_impl",
    headers = ["ContainsImpl.h"],
    feature = triage_InfrastructureSupermoduleOptou,
    use_raw_headers = True,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        ":simd_any_of",
        ":simd_platform",
        "//folly:c_portability",
        "//folly/container:span",
    ],
)

fb_dirsync_cpp_library(
    name = "simd_for_each",
    headers = ["SimdForEach.h"],
    feature = triage_InfrastructureSupermoduleOptou,
    use_raw_headers = True,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        ":unroll_utils",
        "//folly:c_portability",
        "//folly:traits",
        "//folly/algorithm/simd:ignore",
        "//folly/lang:align",
    ],
)

fb_dirsync_cpp_library(
    name = "traits",
    headers = ["Traits.h"],
    feature = triage_InfrastructureSupermoduleOptou,
    use_raw_headers = True,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        "//folly:c_portability",
        "//folly:memory",
        "//folly:traits",
        "//folly/container:span",
    ],
)

fb_dirsync_cpp_library(
    name = "unroll_utils",
    headers = ["UnrollUtils.h"],
    feature = triage_InfrastructureSupermoduleOptou,
    use_raw_headers = True,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        "//folly:portability",
        "//folly:traits",
    ],
)
