################################################################################
# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
# runtime/src/iree/hal/memory/BUILD.bazel                                      #
#                                                                              #
# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
# CMake-only content.                                                          #
#                                                                              #
# To disable autogeneration for this file entirely, delete this header.        #
################################################################################

iree_add_all_subdirs()

iree_cc_library(
  NAME
    arena
  HDRS
    "arena.h"
  SRCS
    "arena.c"
  DEPS
    iree::async
    iree::base
    iree::base::internal
  PUBLIC
)

iree_cc_binary_benchmark(
  NAME
    arena_benchmark
  SRCS
    "arena_benchmark.cc"
  DEPS
    ::arena
    benchmark
    iree::async
    iree::base
    iree::testing::benchmark_main
  TESTONLY
)

iree_cc_test(
  NAME
    arena_test
  SRCS
    "arena_test.cc"
  DEPS
    ::arena
    iree::async
    iree::base
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_library(
  NAME
    fixed_block_allocator
  HDRS
    "fixed_block_allocator.h"
  SRCS
    "fixed_block_allocator.c"
  DEPS
    iree::async
    iree::base
    iree::base::internal
  PUBLIC
)

iree_cc_library(
  NAME
    fixed_block_pool
  HDRS
    "fixed_block_pool.h"
  SRCS
    "fixed_block_pool.c"
  DEPS
    ::fixed_block_allocator
    ::slab_provider
    ::tracing
    iree::async
    iree::base
    iree::base::internal
    iree::hal
  PUBLIC
)

iree_cc_binary_benchmark(
  NAME
    fixed_block_allocator_benchmark
  SRCS
    "fixed_block_allocator_benchmark.cc"
  DEPS
    ::fixed_block_allocator
    benchmark
    iree::async
    iree::base
    iree::testing::benchmark_main
  TESTONLY
)

iree_cc_test(
  NAME
    fixed_block_allocator_test
  SRCS
    "fixed_block_allocator_test.cc"
  DEPS
    ::fixed_block_allocator
    iree::async
    iree::base
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_test(
  NAME
    fixed_block_pool_test
  SRCS
    "fixed_block_pool_test.cc"
  DEPS
    ::cpu_slab_provider
    ::fixed_block_pool
    iree::async
    iree::async::platform
    iree::base
    iree::hal
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_library(
  NAME
    cpu_slab_provider
  HDRS
    "cpu_slab_provider.h"
  SRCS
    "cpu_slab_provider.c"
  DEPS
    ::slab_provider
    iree::base
  PUBLIC
)

iree_cc_library(
  NAME
    passthrough_pool
  HDRS
    "passthrough_pool.h"
  SRCS
    "passthrough_pool.c"
  DEPS
    ::slab_provider
    ::tracing
    iree::async
    iree::base
    iree::base::internal
    iree::hal
  PUBLIC
)

iree_cc_test(
  NAME
    passthrough_pool_test
  SRCS
    "passthrough_pool_test.cc"
  DEPS
    ::cpu_slab_provider
    ::passthrough_pool
    iree::async
    iree::async::platform
    iree::base
    iree::hal
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_library(
  NAME
    slab_cache
  HDRS
    "slab_cache.h"
  SRCS
    "slab_cache.c"
  DEPS
    ::slab_provider
    iree::base
    iree::base::internal
    iree::base::internal::atomic_slist
    iree::base::threading
    iree::base::threading::thread
  PUBLIC
)

iree_cc_library(
  NAME
    slab_provider
  HDRS
    "slab_provider.h"
  SRCS
    "slab_provider.c"
  DEPS
    iree::base
    iree::base::internal
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    tlsf
  HDRS
    "tlsf.h"
  SRCS
    "tlsf.c"
  DEPS
    iree::async
    iree::base
    iree::base::internal
  PUBLIC
)

iree_cc_library(
  NAME
    tlsf_pool
  HDRS
    "tlsf_pool.h"
  SRCS
    "tlsf_pool.c"
  DEPS
    ::slab_provider
    ::tlsf
    ::tracing
    iree::async
    iree::base
    iree::base::internal
    iree::base::threading
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    tracing
  HDRS
    "tracing.h"
  SRCS
    "tracing.c"
  DEPS
    iree::base
    iree::base::internal
  PUBLIC
)

iree_cc_binary_benchmark(
  NAME
    tlsf_benchmark
  SRCS
    "tlsf_benchmark.cc"
  DEPS
    ::tlsf
    benchmark
    iree::async
    iree::base
    iree::testing::benchmark_main
  TESTONLY
)

iree_cc_test(
  NAME
    tlsf_test
  SRCS
    "tlsf_test.cc"
  DEPS
    ::tlsf
    iree::async
    iree::base
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_test(
  NAME
    tlsf_pool_test
  SRCS
    "tlsf_pool_test.cc"
  DEPS
    ::cpu_slab_provider
    ::tlsf_pool
    iree::async
    iree::async::platform
    iree::base
    iree::hal
    iree::testing::gtest
    iree::testing::gtest_main
)

### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
