Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA > Struct Template Reference

#include <AMReX_ParticleArray.H>

Public Types

using container_type = std::tuple< ContainerType< Types >... >
 
using raw_type = amrex::GpuTuple< Types *... >
 
using value_type = ParticleType< ref_wrapper< Types >... >
 

Static Public Member Functions

static constexpr raw_type get_raw_data (container_type &a_container)
 
static constexpr void resize (container_type &a_container, std::size_t a_size)
 
template<typename ValueType >
static constexpr void push_back (container_type &a_container, ValueType &&a_value)
 
static constexpr std::size_t size (container_type &a_container)
 

Detailed Description

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
struct amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >

Implementation of the SoA policy. The underlying data structure is a Tuple<ContainerType<ParticleType>>. Note that unlike the AoS, this container works with a "ref_wrap"ed version of the particle data, so we can modify the particle data in the tile.

Member Typedef Documentation

◆ container_type

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
using amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >::container_type = std::tuple<ContainerType<Types>...>

◆ raw_type

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
using amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >::raw_type = amrex::GpuTuple<Types*...>

◆ value_type

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
using amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >::value_type = ParticleType<ref_wrapper<Types>...>

Member Function Documentation

◆ get_raw_data()

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
static constexpr raw_type amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >::get_raw_data ( container_type a_container)
inlinestaticconstexpr

◆ push_back()

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
template<typename ValueType >
static constexpr void amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >::push_back ( container_type a_container,
ValueType &&  a_value 
)
inlinestaticconstexpr

◆ resize()

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
static constexpr void amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >::resize ( container_type a_container,
std::size_t  a_size 
)
inlinestaticconstexpr

◆ size()

template<template< typename... > class ContainerType, template< typename... > class ParticleType, typename... Types>
static constexpr std::size_t amrex::DataLayoutPolicy< ContainerType, ParticleType< Types... >, DataLayout::SoA >::size ( container_type a_container)
inlinestaticconstexpr

The documentation for this struct was generated from the following file: