1#ifndef ADIAR_INTERNAL_MEMORY_H
2#define ADIAR_INTERNAL_MEMORY_H
6#include <tpie/memory.h>
9#include <adiar/internal/assert.h>
11namespace adiar::internal
19 return tpie::get_memory_manager().available();
30 enum class memory_mode
57 template <
typename T,
typename...
TT>
61 return std::make_shared<T>(std::forward<TT>(
tt)...);
75 template <
typename T,
typename...
TT>
79 return std::make_unique<T>(std::forward<TT>(
tt)...);
consumer< ValueType > make_consumer(OutputIt &iter)
Wrap an iterator into a consumer function.
Definition functional.h:67
Core types.
Definition adiar.h:40
shared_ptr< T > make_shared(TT &&... tt)
Creates a new object on the heap with shared ownership.
Definition memory.h:59
std::unique_ptr< T > unique_ptr
Sole ownership of an object on the heap. Unlike the shared_ptr, this smart pointer has the semantics ...
Definition memory.h:70
unique_ptr< T > make_unique(TT &&... tt)
Creates a new object on the heap with unique ownership.
Definition memory.h:77
std::shared_ptr< T > shared_ptr
Shared ownership of an object on the heap. This smart pointer essentially provides a (thread-safe) re...
Definition memory.h:52