memlayout
Minimal CPU/GPU header-only example library
Loading...
Searching...
No Matches
wrapper.h File Reference

Go to the source code of this file.

Classes

struct  memlayout::RandomAccessAt< ReturnType >
struct  memlayout::GetPointer< ReturnType >
struct  memlayout::AggregateConstructor< ReturnType >
struct  memlayout::FirstMember
struct  memlayout::PreIncrement< ReturnType >
struct  memlayout::PreDecrement< ReturnType >
struct  memlayout::Advance< ReturnType >
struct  memlayout::CopyAssignment
struct  memlayout::Wrapper< Struct, Container, Layout::aos >
struct  memlayout::Wrapper< Struct, pointer, Layout::aos >
struct  memlayout::Wrapper< Struct, Container, Layout::soa >
struct  memlayout::Wrapper< Struct, value, Layout::soa >
struct  memlayout::Wrapper< Struct, reference, Layout::soa >
struct  memlayout::Wrapper< Struct, const_reference, Layout::soa >
struct  memlayout::Wrapper< Struct, pointer, Layout::soa >
struct  memlayout::Wrapper< Struct, const_pointer, Layout::soa >

Namespaces

namespace  memlayout

Macros

#define WRAPPER_APPLY_UNARY(...)
#define WRAPPER_EXPAND(m)
#define WRAPPER_APPLY_BINARY(STRUCT_NAME, ...)

Typedefs

using memlayout::size_t = decltype(sizeof(0))
using memlayout::ptrdiff_t = decltype(static_cast<int*>(nullptr) - static_cast<int*>(nullptr))
template<class T>
using memlayout::value = T
template<class T>
using memlayout::reference = T&
template<class T>
using memlayout::const_reference = const T&
template<class T>
using memlayout::pointer = T*
template<class T>
using memlayout::const_pointer = const T*

Enumerations

enum class  memlayout::Layout { memlayout::aos = 0 , memlayout::soa = 1 }

Macro Definition Documentation

◆ WRAPPER_APPLY_BINARY

#define WRAPPER_APPLY_BINARY ( STRUCT_NAME,
... )
Value:
template <template <class> class other_Container, class Function>\
constexpr STRUCT_NAME apply(STRUCT_NAME<other_Container>& other, Function&& f) { return {__VA_ARGS__}; }\
template <template <class> class other_Container, class Function>\
constexpr STRUCT_NAME apply(STRUCT_NAME<other_Container>& other, Function&& f) const { return {__VA_ARGS__}; }\
template <template <class> class other_Container, class Function>\
constexpr STRUCT_NAME apply(const STRUCT_NAME<other_Container>& other, Function&& f) { return {__VA_ARGS__}; }\
template <template <class> class other_Container, class Function>\
constexpr STRUCT_NAME apply(const STRUCT_NAME<other_Container>& other, Function&& f) const { return {__VA_ARGS__}; }\

Definition at line 273 of file wrapper.h.

273#define WRAPPER_APPLY_BINARY(STRUCT_NAME, ...)\
274 template <template <class> class other_Container, class Function>\
275 constexpr STRUCT_NAME apply(STRUCT_NAME<other_Container>& other, Function&& f) { return {__VA_ARGS__}; }\
276 template <template <class> class other_Container, class Function>\
277 constexpr STRUCT_NAME apply(STRUCT_NAME<other_Container>& other, Function&& f) const { return {__VA_ARGS__}; }\
278 template <template <class> class other_Container, class Function>\
279 constexpr STRUCT_NAME apply(const STRUCT_NAME<other_Container>& other, Function&& f) { return {__VA_ARGS__}; }\
280 template <template <class> class other_Container, class Function>\
281 constexpr STRUCT_NAME apply(const STRUCT_NAME<other_Container>& other, Function&& f) const { return {__VA_ARGS__}; }\
282

◆ WRAPPER_APPLY_UNARY

#define WRAPPER_APPLY_UNARY ( ...)
Value:
template <class Function>\
constexpr auto apply(Function&& f) { return f(__VA_ARGS__); }\
template <class Function>\
constexpr auto apply(Function&& f) const { return f(__VA_ARGS__); }\

Definition at line 265 of file wrapper.h.

265#define WRAPPER_APPLY_UNARY(...)\
266 template <class Function>\
267 constexpr auto apply(Function&& f) { return f(__VA_ARGS__); }\
268 template <class Function>\
269 constexpr auto apply(Function&& f) const { return f(__VA_ARGS__); }\
270

◆ WRAPPER_EXPAND

#define WRAPPER_EXPAND ( m)
Value:
f(m, other.m)

Definition at line 271 of file wrapper.h.