ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
694 stars 218 forks source link

[WIP] Allocate/Initialization Naming #1333

Open ax3l opened 8 years ago

ax3l commented 8 years ago

Name (and introduce where missing) all allocation and initialization members correctly.

WIP: separate this scheme for containers (RAII) and control objects/wrappers (sim/plugin, GridBuffer).

Containers

Currently as RAII Containers which works best for stack allocated objects.

It is worth noting that one can still be RAII when doing "late allocating" with, e.g., resize(n, value) (allocate(n, functor)) as in std::vector. As you see the only constructors being RAII are empty (default) or fill, range, copy, ... (move, =) but not "create size N and do not initialize with a value".

Classes: HostBufferIntern, DeviceBufferIntern

to do:

Classes: GridBuffer (has two RAII container members for host/device + exchanges), ParticlesBuffer (has several GridBuffers) ...

delegate (mix) concepts between:

[WIP] would be interesting if one can make these RAII without making life horrible...

For functions that are currently not splitted or not useful to be splitted between allocate() and initialize() call them

PIConGPU

PMacc

ax3l commented 8 years ago

ccing @psychocoderHPC

erikzenker commented 8 years ago

I would like to have an offgithub meeting about this issue.

ax3l commented 8 years ago

Absolutely, just recorded our offline discussion results so far for continuation (-> [WIP])

bussmann commented 8 years ago

Would like to join.