|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Factory class to obtain instances of array_access_layout. More...
#include <rexlib/core/layout/joint_layout_builder.hpp>
Public Member Functions | |
| joint_layout_builder (const joint_layout_builder &)=delete | |
| joint_layout_builder (joint_layout_builder &&other) noexcept | |
| joint_layout_builder & | operator= (const joint_layout_builder &)=delete |
| joint_layout_builder & | operator= (joint_layout_builder &&other) noexcept |
| joint_layout_builder & | set_extents (span< const std::size_t > extents) |
| Set the extents of the iteration space. | |
| joint_layout_builder & | add_operand (const strided_layout &layout) |
| Add an operand to the layout. | |
| joint_layout_builder & | add_operand (span< const std::size_t > extents, span< const std::ptrdiff_t > strides, std::ptrdiff_t offset) |
| Add an operand to the layout. | |
| joint_layout | build (joint_layout_build_flags flags=default_flags) |
| Build the joint_layout from the operands contained in this builder. | |
| const joint_layout_implementation * | get_implementation () const noexcept |
| Get a pointer to the implementation. | |
Static Public Attributes | |
| static REXLIB_CONST_CONSTEXPR joint_layout_build_flags | default_flags |
Factory class to obtain instances of array_access_layout.
| joint_layout_builder & rexlib::joint_layout_builder::add_operand | ( | const strided_layout & | layout | ) |
Add an operand to the layout.
If set_extents has not been called, the first call to this method will set the extents of the operand as the extents of the iteration space.
When the iteration space extents are defined, the provided layout must be broadcastable to these extents.
| layout | Layout of the operand. |
| joint_layout_builder & rexlib::joint_layout_builder::add_operand | ( | span< const std::size_t > | extents, |
| span< const std::ptrdiff_t > | strides, | ||
| std::ptrdiff_t | offset | ||
| ) |
Add an operand to the layout.
If set_extents has not been called, the first call to this method will set the extents of the operand as the extents of the iteration space.
When the iteration space extents are defined, the provided layout must be broadcastable to these extents.
| extents | The extents of the operand. |
| strides | The strides of the operand |
| offset | The offset of the operand. |
| joint_layout rexlib::joint_layout_builder::build | ( | joint_layout_build_flags | flags = default_flags | ) |
Build the joint_layout from the operands contained in this builder.
The building process can apply certain optimizations to the joint layout which can be controlled though the flags parameter.
| flags | Flags controlling the optimizations applied to the joint layout. By default, all optimizations are enabled. |
|
noexcept |
Get a pointer to the implementation.
| joint_layout_builder & rexlib::joint_layout_builder::set_extents | ( | span< const std::size_t > | extents | ) |
Set the extents of the iteration space.
| extents | Extents of the iteration space. |
| std::logic_error | If the extents were already set, or an operand was already added. |
|
static |