DDC 0.14.0
Loading...
Searching...
No Matches
ddc::experimental Namespace Reference

Classes

struct  Dims
 

Functions

template<class ExecSpace , class Support , class ChunkDst , class BinaryReductionOp , class UnaryTransformOp >
requires (ddc::is_borrowed_chunk_v<ChunkDst>)
void parallel_transform_reduce (std::string const &label, ExecSpace const &execution_space, Support const &domain, ChunkDst &&out, BinaryReductionOp const &reduce, UnaryTransformOp const &transform) noexcept
 Performs a parallel transform-reduce over an nD domain using a Kokkos execution space.
 
template<class ExecSpace , class DDim , concepts::borrowed_chunk ChunkDst, class BinaryReductionOp , class UnaryTransformOp >
void parallel_transform_inclusive_scan (std::string const &label, ExecSpace const &execution_space, Dims< DDim > dim_tag, ChunkDst &&out, BinaryReductionOp const &reduce, UnaryTransformOp const &transform) noexcept
 
template<class ExecSpace , class DDim , concepts::borrowed_chunk ChunkDst, class BinaryReductionOp , class UnaryTransformOp >
void parallel_transform_exclusive_scan (std::string const &label, ExecSpace const &execution_space, Dims< DDim > dim_tag, ChunkDst &&out, BinaryReductionOp const &reduce, UnaryTransformOp const &transform) noexcept
 
template<typename T , typename SupportType , typename LayoutStridedPolicy , typename MemorySpace >
void save_npy (std::ostream &os, ChunkSpan< T, SupportType, LayoutStridedPolicy, MemorySpace > const &chunk_span)
 Save a ddc::ChunkSpan in the NumPy format in a stream.
 
template<typename T , typename SupportType , typename LayoutStridedPolicy , typename MemorySpace >
void save_npy (std::filesystem::path const &filename, ChunkSpan< T, SupportType, LayoutStridedPolicy, MemorySpace > const &chunk_span)
 Save a ddc::ChunkSpan in the NumPy format in a file.
 

Class Documentation

◆ ddc::experimental::Dims

struct ddc::experimental::Dims
template<class... Tags>
struct ddc::experimental::Dims< Tags >

Definition at line 22 of file parallel_transform_scan.hpp.

Collaboration diagram for ddc::experimental::Dims< Tags >:
Collaboration graph

Function Documentation

◆ parallel_transform_reduce()

void ddc::experimental::parallel_transform_reduce ( std::string const label,
ExecSpace const execution_space,
Support const domain,
ChunkDst &&  out,
BinaryReductionOp const reduce,
UnaryTransformOp const transform 
)
noexcept

Performs a parallel transform-reduce over an nD domain using a Kokkos execution space.

For each element of out, a reduction is performed over the dimensions of domain that are not present in out.domain(). The reduction combines the values obtained by applying transform to each element of the corresponding subdomain.

Parameters
[in]labelname used to identify the Kokkos kernel.
[in]execution_spaceKokkos execution space on which the reductions are executed.
[in]domainfull domain over which the transform-reduce is defined.
[out]outchunk receiving the reduction result for each point of out.domain(). Its domain must be a subdomain of domain.
[in]reducebinary reduction operator used to combine transformed values. It must be compatible with the value type stored in out.
[in]transformunary function applied to each element of the reduction subdomain. Its return type must be accepted by reduce.

Definition at line 369 of file parallel_transform_reduce.hpp.

◆ parallel_transform_inclusive_scan()

template<class ExecSpace , class DDim , concepts::borrowed_chunk ChunkDst, class BinaryReductionOp , class UnaryTransformOp >
void ddc::experimental::parallel_transform_inclusive_scan ( std::string const label,
ExecSpace const execution_space,
Dims< DDim dim_tag,
ChunkDst &&  out,
BinaryReductionOp const reduce,
UnaryTransformOp const transform 
)
noexcept

Definition at line 153 of file parallel_transform_scan.hpp.

◆ parallel_transform_exclusive_scan()

template<class ExecSpace , class DDim , concepts::borrowed_chunk ChunkDst, class BinaryReductionOp , class UnaryTransformOp >
void ddc::experimental::parallel_transform_exclusive_scan ( std::string const label,
ExecSpace const execution_space,
Dims< DDim dim_tag,
ChunkDst &&  out,
BinaryReductionOp const reduce,
UnaryTransformOp const transform 
)
noexcept

Definition at line 177 of file parallel_transform_scan.hpp.

◆ save_npy() [1/2]

void ddc::experimental::save_npy ( std::ostream &  os,
ChunkSpan< T, SupportType, LayoutStridedPolicy, MemorySpace > const chunk_span 
)

Save a ddc::ChunkSpan in the NumPy format in a stream.

Parameters
osOutput stream receiving the .npy data.
chunk_spanChunkSpan to serialize.

Definition at line 122 of file save_npy.hpp.

◆ save_npy() [2/2]

void ddc::experimental::save_npy ( std::filesystem::path const filename,
ChunkSpan< T, SupportType, LayoutStridedPolicy, MemorySpace > const chunk_span 
)

Save a ddc::ChunkSpan in the NumPy format in a file.

Parameters
filenamePath to the output .npy file.
chunk_spanChunkSpan to serialize.

Definition at line 140 of file save_npy.hpp.