Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -139,39 +139,39 @@ class executor_pool {
public:
template <typename Interface, typename Pool, typename... Ts>
static void init(size_t number_of_executors, Ts ... executor_args) {
executor_pool_implementation<Interface, Pool>::init(number_of_executors,
pool_manager<Interface, Pool>::init(number_of_executors,
executor_args...);
}
template <typename Interface, typename Pool, typename... Ts>
static void init_all_executor_pools(size_t number_of_executors, Ts ... executor_args) {
executor_pool_implementation<Interface, Pool>::init_all_executor_pools(number_of_executors,
pool_manager<Interface, Pool>::init_all_executor_pools(number_of_executors,
executor_args...);
}
template <typename Interface, typename Pool, typename... Ts>
static void init_executor_pool(size_t pool_id, size_t number_of_executors, Ts ... executor_args) {
executor_pool_implementation<Interface, Pool>::init_executor_pool(pool_id, number_of_executors,
pool_manager<Interface, Pool>::init_executor_pool(pool_id, number_of_executors,
executor_args...);
}
template <typename Interface, typename Pool> static void cleanup() {
executor_pool_implementation<Interface, Pool>::cleanup();
pool_manager<Interface, Pool>::cleanup();
}
template <typename Interface, typename Pool>
static std::tuple<Interface &, size_t> get_interface(const size_t gpu_id) {
return executor_pool_implementation<Interface, Pool>::get_interface(gpu_id);
return pool_manager<Interface, Pool>::get_interface(gpu_id);
}
template <typename Interface, typename Pool>
static void release_interface(size_t index, const size_t gpu_id) noexcept {
executor_pool_implementation<Interface, Pool>::release_interface(index,
pool_manager<Interface, Pool>::release_interface(index,
gpu_id);
}
template <typename Interface, typename Pool>
static bool interface_available(size_t load_limit, const size_t gpu_id) noexcept {
return executor_pool_implementation<Interface, Pool>::interface_available(
return pool_manager<Interface, Pool>::interface_available(
load_limit, gpu_id);
}
template <typename Interface, typename Pool>
static size_t get_current_load(const size_t gpu_id = 0) noexcept {
return executor_pool_implementation<Interface, Pool>::get_current_load(
return pool_manager<Interface, Pool>::get_current_load(
gpu_id);
}
template <typename Interface, typename Pool>
Expand All @@ -182,19 +182,19 @@ class executor_pool {

template <typename Interface, typename Pool>
static void set_device_selector(std::function<void(size_t)> select_gpu_function) {
executor_pool_implementation<Interface, Pool>::set_device_selector(select_gpu_function);
pool_manager<Interface, Pool>::set_device_selector(select_gpu_function);
}

template <typename Interface, typename Pool>
static void select_device(size_t gpu_id) {
executor_pool_implementation<Interface, Pool>::select_device(gpu_id);
pool_manager<Interface, Pool>::select_device(gpu_id);
}

private:
executor_pool() = default;

private:
template <typename Interface, typename Pool> class executor_pool_implementation {
template <typename Interface, typename Pool> class pool_manager {
public:
/// Deprecated! Use init_on_all_gpu or init_on_gpu
template <typename... Ts>
Expand Down Expand Up @@ -277,7 +277,7 @@ class executor_pool {
}

private:
executor_pool_implementation() = default;
pool_manager() = default;
cppuddle::mutex_t pool_mut{};
std::function<void(size_t)> select_gpu_function = [](size_t gpu_id) {
// By default no multi gpu support
Expand All @@ -288,21 +288,21 @@ class executor_pool {
std::deque<Pool> executorpools{};
std::array<cppuddle::mutex_t, cppuddle::max_number_gpus> gpu_mutexes;

static executor_pool_implementation& instance(void) {
static executor_pool_implementation pool_instance{};
static pool_manager& instance(void) {
static pool_manager pool_instance{};
return pool_instance;
}

public:
~executor_pool_implementation() = default;
~pool_manager() = default;
// Bunch of constructors we don't need
executor_pool_implementation(executor_pool_implementation const &other) =
pool_manager(pool_manager const &other) =
delete;
executor_pool_implementation &
operator=(executor_pool_implementation const &other) = delete;
executor_pool_implementation(executor_pool_implementation &&other) = delete;
executor_pool_implementation &
operator=(executor_pool_implementation &&other) = delete;
pool_manager &
operator=(pool_manager const &other) = delete;
pool_manager(pool_manager &&other) = delete;
pool_manager &
operator=(pool_manager &&other) = delete;
};

public:
Expand Down
7 changes: 4 additions & 3 deletions include/kokkos_buffer_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
namespace recycler {
template <typename kokkos_type, typename alloc_type, typename element_type>
using aggregated_recycled_view [[deprecated(
"Use aggregated_recycle_view from header recycling_kokkos_view.hpp "
"instead")]] =
"Use cppuddle::memory_recycling::aggregated_recycling_view from header "
"recycling_kokkos_view.hpp instead")]] =
cppuddle::memory_recycling::aggregated_recycling_view<kokkos_type, alloc_type, element_type>;

template <typename kokkos_type, typename alloc_type, typename element_type>
using recycled_view [[deprecated(
"Use recycle_view from header recycling_kokkos_view.hpp instead")]] =
"Use cppuddle::memory_recycling::recycling_view from header "
"recycling_kokkos_view.hpp instead")]] =
cppuddle::memory_recycling::recycling_view<kokkos_type, alloc_type, element_type>;

} // end namespace recycler
Expand Down