diff --git a/src/AmrCore/AmrMesh.cpp b/src/AmrCore/AmrMesh.cpp index a49010cb..1b041014 100644 --- a/src/AmrCore/AmrMesh.cpp +++ b/src/AmrCore/AmrMesh.cpp @@ -3,19 +3,17 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include -#include +#include "pyAMReX.H" -#include -#include +#include #include -namespace py = pybind11; -using namespace amrex; +void init_AmrMesh(py::module &m) +{ + using namespace amrex; -void init_AmrMesh(py::module &m) { py::class_< AmrInfo >(m, "AmrInfo") .def("__repr__", [](AmrInfo const & amr_info) { @@ -75,6 +73,5 @@ void init_AmrMesh(py::module &m) { .def("finest_level", &AmrMesh::finestLevel) .def("ref_ratio", py::overload_cast< >(&AmrMesh::refRatio, py::const_)) .def("ref_ratio", py::overload_cast< int >(&AmrMesh::refRatio, py::const_)) - ; } diff --git a/src/Base/AMReX.cpp b/src/Base/AMReX.cpp index 51146411..755ed108 100644 --- a/src/Base/AMReX.cpp +++ b/src/Base/AMReX.cpp @@ -1,15 +1,11 @@ -#include +#include "pyAMReX.H" + #include #include #include -#include -#include - #include -namespace py = pybind11; -using namespace amrex; namespace amrex { struct Config {}; @@ -17,13 +13,15 @@ namespace amrex { void init_AMReX(py::module& m) { + using namespace amrex; + py::class_(m, "AMReX") .def_static("empty", &AMReX::empty) .def_static("size", &AMReX::size) .def_static("erase", &AMReX::erase) .def_static("top", &AMReX::top, py::return_value_policy::reference) - ; + ; py::class_(m, "Config") .def_property_readonly_static( diff --git a/src/Base/Arena.cpp b/src/Base/Arena.cpp index cb018179..cae90263 100644 --- a/src/Base/Arena.cpp +++ b/src/Base/Arena.cpp @@ -3,17 +3,14 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include - -#include -#include -#include +#include "pyAMReX.H" -namespace py = pybind11; -using namespace amrex; +#include void init_Arena(py::module &m) { + using namespace amrex; + py::class_< Arena >(m, "Arena"); m.def("The_Arena", &The_Arena, py::return_value_policy::reference) diff --git a/src/Base/Array4.cpp b/src/Base/Array4.cpp index 1807372b..96af32be 100644 --- a/src/Base/Array4.cpp +++ b/src/Base/Array4.cpp @@ -3,24 +3,21 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ +#include "pyAMReX.H" + #include #include #include -#include -#include -#include - #include #include #include -namespace py = pybind11; -using namespace amrex; - namespace { + using namespace amrex; + /** CPU: __array_interface__ v3 * * https://numpy.org/doc/stable/reference/arrays.interface.html @@ -77,6 +74,8 @@ namespace template< typename T > void make_Array4(py::module &m, std::string typestr) { + using namespace amrex; + // dispatch simpler via: py::format_descriptor::format() naming auto const array_name = std::string("Array4_").append(typestr); py::class_< Array4 >(m, array_name.c_str()) diff --git a/src/Base/BaseFab.cpp b/src/Base/BaseFab.cpp index e5d696f6..dc5382fe 100644 --- a/src/Base/BaseFab.cpp +++ b/src/Base/BaseFab.cpp @@ -3,18 +3,17 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" -#include -#include +#include #include -namespace py = pybind11; -using namespace amrex; namespace { + using namespace amrex; + template< typename T > void init_bf(py::module &m, std::string typestr) { auto const bf_name = std::string("BaseFab_").append(typestr); @@ -122,5 +121,7 @@ namespace } void init_BaseFab(py::module &m) { + using namespace amrex; + init_bf(m, "Real"); } diff --git a/src/Base/Box.cpp b/src/Base/Box.cpp index 404d8c90..1164213a 100644 --- a/src/Base/Box.cpp +++ b/src/Base/Box.cpp @@ -3,22 +3,19 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include -#include -#include -#include - #include #include -namespace py = pybind11; -using namespace amrex; namespace { + using namespace amrex; + /** A little Wrapper class to iterate an amrex::Box via * amrex::Box::next(). */ @@ -66,8 +63,9 @@ namespace } void init_Box(py::module &m) { - py::class_< Direction >(m, "Direction"); + using namespace amrex; + py::class_< Direction >(m, "Direction"); py::class_< Box >(m, "Box") diff --git a/src/Base/BoxArray.cpp b/src/Base/BoxArray.cpp index 52a9e376..b83faa2a 100644 --- a/src/Base/BoxArray.cpp +++ b/src/Base/BoxArray.cpp @@ -3,20 +3,17 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include -#include -#include - #include -namespace py = pybind11; -using namespace amrex; - void init_BoxArray(py::module &m) { + using namespace amrex; + /* A collection of Boxes stored in an Array. It is a * reference-counted concrete class, not a polymorphic one; i.e. you * cannot use any of the List member functions with a BoxList diff --git a/src/Base/CoordSys.cpp b/src/Base/CoordSys.cpp index 689e4fbb..e7739c2d 100644 --- a/src/Base/CoordSys.cpp +++ b/src/Base/CoordSys.cpp @@ -1,16 +1,12 @@ -#include -#include - -#include -#include +#include "pyAMReX.H" -#include +#include -namespace py = pybind11; -using namespace amrex; void init_CoordSys(py::module& m) { + using namespace amrex; + py::class_ coord_sys(m, "CoordSys"); coord_sys.def("__repr__", [](const CoordSys&) { diff --git a/src/Base/Dim3.cpp b/src/Base/Dim3.cpp index 21381fbc..f220c307 100644 --- a/src/Base/Dim3.cpp +++ b/src/Base/Dim3.cpp @@ -1,16 +1,14 @@ -#include -#include +#include "pyAMReX.H" -#include -#include +#include #include -namespace py = pybind11; -using namespace amrex; void init_Dim3(py::module& m) { + using namespace amrex; + py::class_(m, "Dim3") .def("__repr__", [](const Dim3& d) { diff --git a/src/Base/DistributionMapping.cpp b/src/Base/DistributionMapping.cpp index c7b536b4..ffeb9ac2 100644 --- a/src/Base/DistributionMapping.cpp +++ b/src/Base/DistributionMapping.cpp @@ -3,21 +3,18 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include #include -#include -#include - #include -namespace py = pybind11; -using namespace amrex; - void init_DistributionMapping(py::module &m) { + using namespace amrex; + py::class_< DistributionMapping >(m, "DistributionMapping") .def("__repr__", [](DistributionMapping const & dm) { diff --git a/src/Base/FArrayBox.cpp b/src/Base/FArrayBox.cpp index 76590df4..68b2197d 100644 --- a/src/Base/FArrayBox.cpp +++ b/src/Base/FArrayBox.cpp @@ -3,20 +3,18 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" -#include -#include +#include #include #include #include -namespace py = pybind11; -using namespace amrex; - void init_FArrayBox(py::module &m) { + using namespace amrex; + py::class_< FArrayBox, BaseFab >(m, "FArrayBox") .def("__repr__", [](FArrayBox const & /* fab */) { diff --git a/src/Base/Geometry.cpp b/src/Base/Geometry.cpp index bab92b77..9b302325 100644 --- a/src/Base/Geometry.cpp +++ b/src/Base/Geometry.cpp @@ -1,22 +1,19 @@ -#include +#include "pyAMReX.H" + #include #include #include #include -#include -// #include -#include - #include #include #include -namespace py = pybind11; -using namespace amrex; void init_Geometry(py::module& m) { + using namespace amrex; + py::class_(m, "GeometryData") .def("__repr__", [](const GeometryData&) { diff --git a/src/Base/IndexType.cpp b/src/Base/IndexType.cpp index 6a94cdc5..60037797 100644 --- a/src/Base/IndexType.cpp +++ b/src/Base/IndexType.cpp @@ -3,21 +3,16 @@ * Authors: David Grote * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include #include -#include -#include -#include - #include #include #include -namespace py = pybind11; -using namespace amrex; namespace { int check_index(const int i) @@ -30,6 +25,8 @@ namespace { } void init_IndexType(py::module &m) { + using namespace amrex; + py::class_< IndexType > index_type(m, "IndexType"); index_type.def("__repr__", [](py::object& obj) { diff --git a/src/Base/IntVect.cpp b/src/Base/IntVect.cpp index e3544890..6922e3ac 100644 --- a/src/Base/IntVect.cpp +++ b/src/Base/IntVect.cpp @@ -3,23 +3,20 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include -#include -#include -#include - #include #include #include -namespace py = pybind11; -using namespace amrex; +void init_IntVect(py::module &m) +{ + using namespace amrex; -void init_IntVect(py::module &m) { py::class_< IntVect >(m, "IntVect") .def("__repr__", [](py::object& obj) { diff --git a/src/Base/Iterator.H b/src/Base/Iterator.H index cf814d99..c4693588 100644 --- a/src/Base/Iterator.H +++ b/src/Base/Iterator.H @@ -5,7 +5,8 @@ */ #pragma once -#include +#include "pyAMReX.H" + #include #include #include @@ -13,14 +14,9 @@ #include #include -#include -#include - #include #include -namespace py = pybind11; -using namespace amrex; namespace pyAMReX { diff --git a/src/Base/MultiFab.cpp b/src/Base/MultiFab.cpp index deb65551..8331c4b5 100644 --- a/src/Base/MultiFab.cpp +++ b/src/Base/MultiFab.cpp @@ -3,9 +3,10 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ +#include "pyAMReX.H" + #include "Base/Iterator.H" -#include #include #include #include @@ -13,17 +14,14 @@ #include #include -#include -#include - #include #include -namespace py = pybind11; -using namespace amrex; +void init_MultiFab(py::module &m) +{ + using namespace amrex; -void init_MultiFab(py::module &m) { py::class_< MFInfo >(m, "MFInfo") .def_readwrite("alloc", &MFInfo::alloc) .def_readwrite("arena", &MFInfo::arena) diff --git a/src/Base/PODVector.cpp b/src/Base/PODVector.cpp index 0a746561..3b1b43cc 100644 --- a/src/Base/PODVector.cpp +++ b/src/Base/PODVector.cpp @@ -3,21 +3,17 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ -#include -#include +#include "pyAMReX.H" -#include -#include -#include +#include #include -namespace py = pybind11; -using namespace amrex; - namespace { + using namespace amrex; + /** CPU: __array_interface__ v3 * * https://numpy.org/doc/stable/reference/arrays.interface.html @@ -40,6 +36,8 @@ namespace template > void make_PODVector(py::module &m, std::string typestr, std::string allocstr) { + using namespace amrex; + using PODVector_type = PODVector; auto const podv_name = std::string("PODVector_").append(typestr) .append("_").append(allocstr); diff --git a/src/Base/ParallelDescriptor.cpp b/src/Base/ParallelDescriptor.cpp index 73a4b5ec..c48aa033 100644 --- a/src/Base/ParallelDescriptor.cpp +++ b/src/Base/ParallelDescriptor.cpp @@ -3,27 +3,21 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include -#include - -#include -#include -#include +#include "pyAMReX.H" -#include -#include +#include -namespace py = pybind11; -using namespace amrex; +void init_ParallelDescriptor(py::module &m) +{ + using namespace amrex; -void init_ParallelDescriptor(py::module &m) { auto mpd = m.def_submodule("ParallelDescriptor"); mpd.def("NProcs", py::overload_cast<>(&ParallelDescriptor::NProcs)) .def("MyProc", py::overload_cast<>(&ParallelDescriptor::MyProc)) .def("IOProcessor", py::overload_cast<>(&ParallelDescriptor::IOProcessor)) .def("IOProcessorNumber", py::overload_cast<>(&ParallelDescriptor::IOProcessorNumber)) - ; + ; // ... } diff --git a/src/Base/ParmParse.cpp b/src/Base/ParmParse.cpp index f3be0871..c906d83e 100644 --- a/src/Base/ParmParse.cpp +++ b/src/Base/ParmParse.cpp @@ -3,23 +3,20 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include #include -#include -#include -#include - #include #include -namespace py = pybind11; -using namespace amrex; +void init_ParmParse(py::module &m) +{ + using namespace amrex; -void init_ParmParse(py::module &m) { py::class_(m, "ParmParse") .def("__repr__", [](ParmParse const &) { diff --git a/src/Base/Periodicity.cpp b/src/Base/Periodicity.cpp index e791185a..64215f63 100644 --- a/src/Base/Periodicity.cpp +++ b/src/Base/Periodicity.cpp @@ -3,22 +3,21 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ +#include "pyAMReX.H" + #include #include #include #include -#include -#include -#include - #include #include -namespace py = pybind11; -using namespace amrex; -void init_Periodicity(py::module &m) { +void init_Periodicity(py::module &m) +{ + using namespace amrex; + py::class_< Periodicity >(m, "Periodicity") .def("__repr__", [](Periodicity const & p) { diff --git a/src/Base/RealBox.cpp b/src/Base/RealBox.cpp index da62ddf3..7a491934 100644 --- a/src/Base/RealBox.cpp +++ b/src/Base/RealBox.cpp @@ -3,7 +3,8 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include #include @@ -12,19 +13,14 @@ #include #include -#include -#include -#include - #include #include #include #include -namespace py = pybind11; -using namespace amrex; void init_RealBox(py::module &m) { + using namespace amrex; py::class_< RealBox >(m, "RealBox") .def("__repr__", diff --git a/src/Base/RealVect.cpp b/src/Base/RealVect.cpp index c181dbea..26746157 100644 --- a/src/Base/RealVect.cpp +++ b/src/Base/RealVect.cpp @@ -3,25 +3,21 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include -#include -#include -#include - #include #include #include #include -namespace py = pybind11; -using namespace amrex; void init_RealVect(py::module &m) { + using namespace amrex; - auto py_realvect = py::class_< RealVect>(m, "RealVect") + auto py_realvect = py::class_< RealVect>(m, "RealVect") .def("__repr__", [](py::object& obj) { py::str py_name = obj.attr("__class__").attr("__name__"); diff --git a/src/Base/Utility.cpp b/src/Base/Utility.cpp index 292e0a7f..8d3ab425 100644 --- a/src/Base/Utility.cpp +++ b/src/Base/Utility.cpp @@ -3,12 +3,12 @@ * License: BSD-3-Clause-LBNL * Authors: Revathi Jambunathan, Axel Huebl */ +#include "pyAMReX.H" + #include -#include -#include -namespace py = pybind11; -using namespace amrex; +#include + void init_Utility(py::module& m) { diff --git a/src/Base/Vector.cpp b/src/Base/Vector.cpp index 8d1000f9..0ce350a4 100644 --- a/src/Base/Vector.cpp +++ b/src/Base/Vector.cpp @@ -3,13 +3,9 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ -#include -#include +#include "pyAMReX.H" -#include -#include -#include -#include +#include #include #include @@ -17,11 +13,11 @@ #include #include -namespace py = pybind11; -using namespace amrex; namespace { + using namespace amrex; + /** CPU: __array_interface__ v3 * * https://numpy.org/doc/stable/reference/arrays.interface.html @@ -44,6 +40,8 @@ namespace template > void make_Vector(py::module &m, std::string typestr) { + using namespace amrex; + using Vector_type = Vector; auto const v_name = std::string("Vector_").append(typestr); @@ -97,7 +95,10 @@ void make_Vector(py::module &m, std::string typestr) ; } -void init_Vector(py::module& m) { +void init_Vector(py::module& m) +{ + using namespace amrex; + make_Vector (m, "Real"); if constexpr(!std::is_same_v) make_Vector (m, "ParticleReal"); diff --git a/src/Particle/ArrayOfStructs.cpp b/src/Particle/ArrayOfStructs.cpp index 8d31b4fa..00aa7072 100644 --- a/src/Particle/ArrayOfStructs.cpp +++ b/src/Particle/ArrayOfStructs.cpp @@ -3,20 +3,18 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include -#include -#include - #include -namespace py = pybind11; -using namespace amrex; namespace { + using namespace amrex; + /** CPU: __array_interface__ v3 * * https://numpy.org/doc/stable/reference/arrays.interface.html @@ -65,6 +63,8 @@ template class Allocator=DefaultAllocator> void make_ArrayOfStructs(py::module &m, std::string allocstr) { + using namespace amrex; + using AOSType = ArrayOfStructs; using ParticleType = T_ParticleType; @@ -124,6 +124,8 @@ void make_ArrayOfStructs(py::module &m, std::string allocstr) template void make_ArrayOfStructs(py::module &m) { + using namespace amrex; + // AMReX legacy AoS position + id/cpu particle ype using ParticleType = Particle; diff --git a/src/Particle/Particle.cpp b/src/Particle/Particle.cpp index bfae8553..deff1aa7 100644 --- a/src/Particle/Particle.cpp +++ b/src/Particle/Particle.cpp @@ -3,16 +3,14 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ +#include "pyAMReX.H" + #include #include #include #include #include -#include -#include -#include - #include #include #include @@ -23,10 +21,6 @@ #include -namespace py = pybind11; -using namespace amrex; -using pReal = amrex_particle_real; - struct PIdx { enum RealValues { // Particle Attributes for sample particle struct-of-arrays @@ -56,6 +50,8 @@ namespace template void make_Particle(py::module &m) { + using namespace amrex; + using ParticleType = Particle; auto const particle_name = std::string("Particle_").append(std::to_string(T_NReal) + "_" + std::to_string(T_NInt)); py::class_ (m, particle_name.c_str()) diff --git a/src/Particle/ParticleContainer.H b/src/Particle/ParticleContainer.H index 02f5c34f..a4eb0d26 100644 --- a/src/Particle/ParticleContainer.H +++ b/src/Particle/ParticleContainer.H @@ -5,6 +5,8 @@ */ #pragma once +#include "pyAMReX.H" + #include "Base/Iterator.H" #include @@ -18,13 +20,9 @@ #include #include -#include -#include - #include #include -namespace py = pybind11; template std::string particle_type_suffix () @@ -46,6 +44,8 @@ std::string particle_type_suffix () template void make_Base_Iterators (py::module &m, std::string allocstr) { + using namespace amrex; + using iterator_base = T_ParIterBase; using container = typename iterator_base::ContainerType; using ParticleType = typename container::ParticleType; @@ -95,9 +95,11 @@ void make_Base_Iterators (py::module &m, std::string allocstr) py::return_value_policy::reference_internal); } -template class Allocator=DefaultAllocator> +template class Allocator=amrex::DefaultAllocator> void make_Iterators (py::module &m, std::string allocstr) { + using namespace amrex; + using iterator = T_ParIter; using container = typename iterator::ContainerType; using ParticleType = typename container::ParticleType; @@ -130,6 +132,8 @@ void make_Iterators (py::module &m, std::string allocstr) template void make_ParticleInitData (py::module &m) { + using namespace amrex; + using ParticleType = T_ParticleType; using ParticleInitData = ParticleInitType; // depends on https://github.com/AMReX-Codes/amrex/pull/3280 @@ -153,9 +157,11 @@ void make_ParticleInitData (py::module &m) { } template class Allocator=DefaultAllocator> + template class Allocator=amrex::DefaultAllocator> void make_ParticleContainer_and_Iterators (py::module &m, std::string allocstr) { + using namespace amrex; + using ParticleType = T_ParticleType; using ParticleContainerType = ParticleContainer_impl< ParticleType, T_NArrayReal, T_NArrayInt, diff --git a/src/Particle/ParticleTile.cpp b/src/Particle/ParticleTile.cpp index 3bbd6ff9..4885713b 100644 --- a/src/Particle/ParticleTile.cpp +++ b/src/Particle/ParticleTile.cpp @@ -3,27 +3,25 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include #include #include -#include -#include - #include -namespace py = pybind11; -using namespace amrex; - //Forward declaration template void make_Particle(py::module &m); template -void make_ParticleTileData(py::module &m) { +void make_ParticleTileData(py::module &m) +{ + using namespace amrex; + using ParticleType = T_ParticleType; constexpr int NStructReal = ParticleType::NReal; constexpr int NStructInt = ParticleType::NInt; @@ -52,9 +50,11 @@ void make_ParticleTileData(py::module &m) { } template class Allocator=DefaultAllocator> + template class Allocator=amrex::DefaultAllocator> void make_ParticleTile(py::module &m, std::string allocstr) { + using namespace amrex; + using ParticleType = T_ParticleType; constexpr int NStructReal = ParticleType::NReal; constexpr int NStructInt = ParticleType::NInt; @@ -163,6 +163,8 @@ void make_ParticleTile(py::module &m) } void init_ParticleTile(py::module& m) { + using namespace amrex; + // AMReX legacy AoS position + id/cpu particle ype using ParticleType_0_0 = Particle<0, 0>; using ParticleType_1_1 = Particle<1, 1>; diff --git a/src/Particle/StructOfArrays.cpp b/src/Particle/StructOfArrays.cpp index 88209554..d3f80539 100644 --- a/src/Particle/StructOfArrays.cpp +++ b/src/Particle/StructOfArrays.cpp @@ -3,23 +3,20 @@ * Authors: Ryan Sandberg * License: BSD-3-Clause-LBNL */ -#include +#include "pyAMReX.H" + #include #include -#include -#include - #include -namespace py = pybind11; -using namespace amrex; - template class Allocator=DefaultAllocator> + template class Allocator=amrex::DefaultAllocator> void make_StructOfArrays(py::module &m, std::string allocstr) { + using namespace amrex; + using SOAType = StructOfArrays; auto const soa_name = std::string("StructOfArrays_") + std::to_string(NReal) + "_" + diff --git a/src/pyAMReX.H b/src/pyAMReX.H new file mode 100644 index 00000000..d9c1a5c6 --- /dev/null +++ b/src/pyAMReX.H @@ -0,0 +1,21 @@ +/* Copyright 2021-2023 The AMReX Community + * + * This header is used to centrally define classes that shall not violate the + * C++ one-definition-rule (ODR) for various Python translation units. + * + * Authors: Axel Huebl + * License: BSD-3-Clause-LBNL + */ +#include +#include +#include +#include +#include +#include + +#include +//include + +namespace py = pybind11; + +//PYBIND11_MAKE_OPAQUE(std::list<...>) diff --git a/src/pyAMReX.cpp b/src/pyAMReX.cpp index 3b0b7899..a5e67307 100644 --- a/src/pyAMReX.cpp +++ b/src/pyAMReX.cpp @@ -3,17 +3,13 @@ * Authors: Axel Huebl * License: BSD-3-Clause-LBNL */ -#include -#include +#include "pyAMReX.H" -#include -#include +#include #define STRINGIFY(x) #x #define MACRO_STRINGIFY(x) STRINGIFY(x) -namespace py = pybind11; - // forward declarations of exposed classes void init_AMReX(py::module&);