NEURON
soa_container.hpp File Reference
#include "backtrace_utils.h"
#include "memory_usage.hpp"
#include "neuron/container/data_handle.hpp"
#include "neuron/container/generic_data_handle.hpp"
#include "neuron/container/soa_identifier.hpp"
#include <algorithm>
#include <cstddef>
#include <functional>
#include <limits>
#include <mutex>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  neuron::container::detail::index_of_type_helper< T, std::tuple< T, Ts... > >
 
struct  neuron::container::detail::index_of_type_helper< T, std::tuple< U, Ts... > >
 
struct  neuron::container::detail::has_num_variables< T, typename >
 
struct  neuron::container::detail::has_num_variables< T, std::void_t< decltype(std::declval< T >().num_variables())> >
 
struct  neuron::container::detail::optional< T, typename >
 
struct  neuron::container::detail::optional< T, std::void_t< decltype(T::optional)> >
 
struct  neuron::container::detail::index_column_tag
 
struct  neuron::container::detail::field_data< Tag, impl >
 
struct  neuron::container::detail::field_data< Tag, FieldImplementation::RuntimeVariable >
 Storage manager for a tag type that implements num_variables(). More...
 
struct  neuron::container::detail::storage_info_impl
 
class  neuron::container::detail::AccumulateMemoryUsage
 
struct  neuron::container::state_token< Container >
 Token whose lifetime manages the frozen state of a container. More...
 
struct  neuron::container::soa< Storage, Tags >
 Utility for generating SOA data structures. More...
 

Namespaces

 neuron
 In mechanism libraries, cannot use auto const token = nrn_ensure_model_data_are_sorted(); because the return type is incomplete (from include/neuron/model_data.hpp).
 
 neuron::container
 
 neuron::container::detail
 

Enumerations

enum class  neuron::container::detail::FieldImplementation { neuron::container::detail::AlwaysSingle , neuron::container::detail::OptionalSingle , neuron::container::detail::RuntimeVariable }
 
enum class  neuron::container::detail::may_cause_reallocation { neuron::container::detail::Yes , neuron::container::detail::No }
 

Functions

template<typename T >
auto neuron::container::detail::get_array_dimension (T const &t, std::nullptr_t) -> decltype(t.array_dimension(), 0)
 
template<typename T >
auto neuron::container::detail::get_array_dimension (T const &t, int i) -> decltype(t.array_dimension(i), 0)
 
template<typename T >
int neuron::container::detail::get_array_dimension (T const &,...)
 
template<class T >
size_t neuron::container::detail::get_num_variables (T const &t)
 
template<typename Tag >
auto neuron::container::detail::get_name_impl (Tag const &tag, int field_index, std::nullptr_t) -> decltype(static_cast< void >(tag.name(field_index)), std::string())
 
template<typename Tag >
std::string neuron::container::detail::get_name_impl (Tag const &tag, int field_index,...)
 
template<typename Tag >
auto neuron::container::detail::get_name (Tag const &tag, int field_index)
 Get the nicest available name for the field_index-th instance of Tag. More...
 
template<typename Rng >
bool neuron::container::detail::check_permutation_vector (Rng const &range, std::size_t size)
 Check if the given range is a permutation of the first N integers. More...
 
VectorMemoryUsage neuron::container::detail::compute_defer_delete_storage_size ()
 
template<typename T >
void neuron::container::detail::defer_delete (std::unique_ptr< T[]> data)
 Storage for safe deletion of soa<...> containers. More...
 
template<class Storage , class... Tags>
StorageMemoryUsage neuron::container::memory_usage (const soa< Storage, Tags... > &data)
 

Variables

template<typename T , typename... Ts>
constexpr bool neuron::container::detail::type_in_pack_v = std::disjunction_v<std::is_same<T, Ts>...>
 
template<typename T , typename... Types>
constexpr bool neuron::container::detail::are_types_unique_v
 
template<typename T >
constexpr bool neuron::container::detail::are_types_unique_v< T > = true
 
template<typename T , typename... Ts>
constexpr std::size_t neuron::container::detail::index_of_type_v
 
template<typename T , typename = void>
constexpr bool neuron::container::detail::has_default_value_v = false
 
template<typename T >
constexpr bool neuron::container::detail::has_num_variables_v = has_num_variables<T>::value
 
template<typename T >
constexpr bool neuron::container::detail::optional_v = optional<T>::value
 
template<typename Tag >
constexpr FieldImplementation neuron::container::detail::field_impl_v
 
std::vector< void * > * neuron::container::detail::defer_delete_storage {}
 Defer deleting pointers to deallocated memory. More...