|
Template Numerical Library version\ main:4904c12
|
Namespace for the segments data structures. More...
Typedefs | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int WarpSize = Backend::getWarpSize()> | |
| using | ColumnMajorBiEllpack = BiEllpack< Device, Index, IndexAllocator, ColumnMajorOrder, WarpSize > |
| Alias for column-major BiEllpack segments. | |
| template<typename Device, typename Index, int WarpSize = Backend::getWarpSize()> | |
| using | ColumnMajorBiEllpackView = BiEllpackView< Device, Index, ColumnMajorOrder, WarpSize > |
| Alias for column-major BiEllpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >> | |
| using | ColumnMajorChunkedEllpack = ChunkedEllpack< Device, Index, IndexAllocator, ColumnMajorOrder > |
| Alias for column-major ChunkedEllpack segments. | |
| template<typename Device, typename Index> | |
| using | ColumnMajorChunkedEllpackView = ChunkedEllpackView< Device, Index, ColumnMajorOrder > |
| Alias for column-major ChunkedEllpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int Alignment = 32> | |
| using | ColumnMajorEllpack = Ellpack< Device, Index, IndexAllocator, ColumnMajorOrder, Alignment > |
| Alias for column-major Ellpack segments. | |
| template<typename Device, typename Index, int Alignment = 32> | |
| using | ColumnMajorEllpackView = EllpackView< Device, Index, ColumnMajorOrder, Alignment > |
| Alias for column-major Ellpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int SliceSize = 32> | |
| using | ColumnMajorSlicedEllpack = SlicedEllpack< Device, Index, IndexAllocator, ColumnMajorOrder, SliceSize > |
| Alias for column-major SlicedEllpack segments. | |
| template<typename Device, typename Index, int SliceSize = 32> | |
| using | ColumnMajorSlicedEllpackView = SlicedEllpackView< Device, Index, ColumnMajorOrder, SliceSize > |
| Alias for column-major SlicedEllpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int WarpSize = Backend::getWarpSize()> | |
| using | RowMajorBiEllpack = BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize > |
| Alias for row-major BiEllpack segments. | |
| template<typename Device, typename Index, int WarpSize = Backend::getWarpSize()> | |
| using | RowMajorBiEllpackView = BiEllpackView< Device, Index, RowMajorOrder, WarpSize > |
| Alias for row-major BiEllpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >> | |
| using | RowMajorChunkedEllpack = ChunkedEllpack< Device, Index, IndexAllocator, RowMajorOrder > |
| Alias for row-major ChunkedEllpack segments. | |
| template<typename Device, typename Index> | |
| using | RowMajorChunkedEllpackView = ChunkedEllpackView< Device, Index, RowMajorOrder > |
| Alias for row-major ChunkedEllpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int Alignment = 32> | |
| using | RowMajorEllpack = Ellpack< Device, Index, IndexAllocator, RowMajorOrder, Alignment > |
| Alias for row-major Ellpack segments. | |
| template<typename Device, typename Index, int Alignment = 32> | |
| using | RowMajorEllpackView = EllpackView< Device, Index, RowMajorOrder, Alignment > |
| Alias for row-major Ellpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int SliceSize = 32> | |
| using | RowMajorSlicedEllpack = SlicedEllpack< Device, Index, IndexAllocator, RowMajorOrder, SliceSize > |
| Alias for row-major SlicedEllpack segments. | |
| template<typename Device, typename Index, int SliceSize = 32> | |
| using | RowMajorSlicedEllpackView = SlicedEllpackView< Device, Index, RowMajorOrder, SliceSize > |
| Alias for row-major SlicedEllpack segments view. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >> | |
| using | SortedAdaptiveCSR = SortedSegments< AdaptiveCSR< Device, Index, IndexAllocator > > |
| Alias for sorted segments based on AdaptiveCSR segments. | |
| template<typename Device, typename Index> | |
| using | SortedAdaptiveCSRView = SortedSegmentsView< AdaptiveCSRView< Device, Index > > |
| Alias for sorted segments based on CSR segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, ElementsOrganization Organization = TNL::Algorithms::Segments::DefaultElementsOrganization< Device >::getOrganization(), int WarpSize = Backend::getWarpSize()> | |
| using | SortedBiEllpack = SortedSegments< BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize > > |
| Alias for sorted segments based on BiEllpack segments. | |
| template<typename Device, typename Index, ElementsOrganization Organization = Segments::DefaultElementsOrganization< Device >::getOrganization(), int WarpSize = Backend::getWarpSize()> | |
| using | SortedBiEllpackView = SortedSegmentsView< BiEllpackView< Device, Index, Organization, WarpSize > > |
| Alias for sorted segments based on BiEllpackView segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, ElementsOrganization Organization = TNL::Algorithms::Segments::DefaultElementsOrganization< Device >::getOrganization()> | |
| using | SortedChunkedEllpack = SortedSegments< ChunkedEllpack< Device, Index, IndexAllocator, Organization > > |
| Alias for sorted segments based on ChunkedEllpack segments. | |
| template<typename Device, typename Index, ElementsOrganization Organization = Segments::DefaultElementsOrganization< Device >::getOrganization()> | |
| using | SortedChunkedEllpackView = SortedSegmentsView< ChunkedEllpackView< Device, Index, Organization > > |
| Alias for sorted segments based on ChunkedEllpackView segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int WarpSize = Backend::getWarpSize()> | |
| using | SortedColumnMajorBiEllpack = SortedSegments< ColumnMajorBiEllpack< Device, Index, IndexAllocator, WarpSize > > |
| Alias for sorted segments based on column-major BiEllpack segments. | |
| template<typename Device, typename Index, int WarpSize = Backend::getWarpSize()> | |
| using | SortedColumnMajorBiEllpackView = SortedSegmentsView< ColumnMajorBiEllpackView< Device, Index, WarpSize > > |
| Alias for sorted segments based on column-major BiEllpack segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >> | |
| using | SortedColumnMajorChunkedEllpack = SortedSegments< ColumnMajorChunkedEllpack< Device, Index, IndexAllocator > > |
| Alias for sorted segments based on column-major ChunkedEllpack segments. | |
| template<typename Device, typename Index> | |
| using | SortedColumnMajorChunkedEllpackView = SortedSegmentsView< ColumnMajorChunkedEllpackView< Device, Index > > |
| Alias for sorted segments based on column-major ChunkedEllpack segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int Alignment = 32> | |
| using | SortedColumnMajorEllpack = SortedSegments< ColumnMajorEllpack< Device, Index, IndexAllocator, Alignment > > |
| Alias for sorted segments based on column-major Ellpack segments. | |
| template<typename Device, typename Index, int Alignment = 32> | |
| using | SortedColumnMajorEllpackView = SortedSegmentsView< ColumnMajorEllpackView< Device, Index, Alignment > > |
| Alias for sorted segments based on column-major Ellpack segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int SliceSize = 32> | |
| using | SortedColumnMajorSlicedEllpack = SortedSegments< ColumnMajorSlicedEllpack< Device, Index, IndexAllocator, SliceSize > > |
| Alias for sorted column-major SlicedEllpack segments. | |
| template<typename Device, typename Index, int SliceSize = 32> | |
| using | SortedColumnMajorSlicedEllpackView = SortedSegmentsView< ColumnMajorSlicedEllpackView< Device, Index, SliceSize > > |
| Alias for sorted segments based on column-major SlicedEllpack segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >> | |
| using | SortedCSR = SortedSegments< CSR< Device, Index, IndexAllocator > > |
| Alias for sorted segments based on CSR segments. | |
| template<typename Device, typename Index> | |
| using | SortedCSRView = SortedSegmentsView< CSRView< Device, Index > > |
| Alias for sorted segments based on CSR segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, ElementsOrganization Organization = TNL::Algorithms::Segments::DefaultElementsOrganization< Device >::getOrganization(), int Alignment = 32> | |
| using | SortedEllpack = SortedSegments< Ellpack< Device, Index, IndexAllocator, Organization, Alignment > > |
| Alias for sorted segments based on Ellpack segments. | |
| template<typename Device, typename Index, ElementsOrganization Organization = Segments::DefaultElementsOrganization< Device >::getOrganization(), int Alignment = 32> | |
| using | SortedEllpackView = SortedSegmentsView< EllpackView< Device, Index, Organization, Alignment > > |
| Alias for sorted segments based on EllpackView segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int WarpSize = Backend::getWarpSize()> | |
| using | SortedRowMajorBiEllpack = SortedSegments< RowMajorBiEllpack< Device, Index, IndexAllocator, WarpSize > > |
| Alias for sorted segments based on row-major BiEllpack segments. | |
| template<typename Device, typename Index, int WarpSize = Backend::getWarpSize()> | |
| using | SortedRowMajorBiEllpackView = SortedSegmentsView< RowMajorBiEllpackView< Device, Index, WarpSize > > |
| Alias for sorted segments based on row-major BiEllpackView segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >> | |
| using | SortedRowMajorChunkedEllpack = SortedSegments< RowMajorChunkedEllpack< Device, Index, IndexAllocator > > |
| Alias for sorted segments based on row-major ChunkedEllpack segments. | |
| template<typename Device, typename Index> | |
| using | SortedRowMajorChunkedEllpackView = SortedSegmentsView< RowMajorChunkedEllpackView< Device, Index > > |
| Alias for sorted segments based on row-major ChunkedEllpackView segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int Alignment = 32> | |
| using | SortedRowMajorEllpack = SortedSegments< RowMajorEllpack< Device, Index, IndexAllocator, Alignment > > |
| Alias for sorted segments based on row-major Ellpack segments. | |
| template<typename Device, typename Index, int Alignment = 32> | |
| using | SortedRowMajorEllpackView = SortedSegmentsView< RowMajorEllpackView< Device, Index, Alignment > > |
| Alias for sorted segments based on row-major EllpackView segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, int SliceSize = 32> | |
| using | SortedRowMajorSlicedEllpack = SortedSegments< RowMajorSlicedEllpack< Device, Index, IndexAllocator, SliceSize > > |
| Alias sorted for row-major SlicedEllpack segments. | |
| template<typename Device, typename Index, int SliceSize = 32> | |
| using | SortedRowMajorSlicedEllpackView = SortedSegmentsView< RowMajorSlicedEllpackView< Device, Index, SliceSize > > |
| Alias for sorted segments based on row-major SlicedEllpackView segments. | |
| template<typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, ElementsOrganization Organization = TNL::Algorithms::Segments::DefaultElementsOrganization< Device >::getOrganization(), int SliceSize = 32> | |
| using | SortedSlicedEllpack = SortedSegments< SlicedEllpack< Device, Index, IndexAllocator, Organization, SliceSize > > |
| Alias for sorted SlicedEllpack segments. | |
| template<typename Device, typename Index, ElementsOrganization Organization = Segments::DefaultElementsOrganization< Device >::getOrganization(), int SliceSize = 32> | |
| using | SortedSlicedEllpackView = SortedSegmentsView< SlicedEllpackView< Device, Index, Organization, SliceSize > > |
| Alias for sorted segments based on SlicedEllpackView segments. | |
Enumerations | |
| enum | ElementsOrganization : std::uint8_t { ColumnMajorOrder = 0 , RowMajorOrder } |
| enum class | ThreadsToSegmentsMapping : std::uint8_t { Fixed , Warp , Block , BlockMerged , DynamicGrouping } |
| Enumeration for mapping threads to segments. More... | |
Functions | |
| template<typename Segments, typename Fetch, typename Reduce, typename Write> | |
| void | exclusiveScanAllSegments (const Segments &segments, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute exclusive prefix-sum (scan) within all segments. . | |
| template<typename Segments, typename Condition, typename Fetch, typename Reduce, typename Write> | |
| void | exclusiveScanAllSegmentsIf (const Segments &segments, Condition &&condition, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute exclusive conditional prefix-sum (scan) within all segments. . | |
| template<typename SegmentView, typename Fetch, typename Reduce, typename Write> | |
| __cuda_callable__ void | exclusiveScanSegment (SegmentView &segment, Fetch &&fetch, Reduce &&reduce, Write &&write) |
| Computes an exclusive scan (or prefix sum) within a segment. . | |
| template<typename Segments, typename Array, typename Fetch, typename Reduce, typename Write> | |
| void | exclusiveScanSegments (const Segments &segments, const Array &segmentIndexes, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute exclusive prefix-sum (scan) within all segments specified by a segment index array. . | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Fetch, typename Reduce, typename Write, typename T = std::enable_if_t< std::is_integral_v< IndexBegin > && std::is_integral_v< IndexEnd > >> | |
| void | exclusiveScanSegments (const Segments &segments, IndexBegin begin, IndexEnd end, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute exclusive prefix-sum (scan) within specified segments in a range. . | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Condition, typename Fetch, typename Reduce, typename Write, typename T = typename std::enable_if_t< std::is_integral_v< IndexBegin > && std::is_integral_v< IndexEnd > >> | |
| void | exclusiveScanSegmentsIf (const Segments &segments, IndexBegin begin, IndexEnd end, Condition &&condition, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute exclusive conditional prefix-sum (scan) within specified segments in a range. . | |
| template<typename Segments, typename Function> | |
| void | forAllElements (const Segments &segments, Function &&function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over all elements of all segments and applies the specified lambda function. | |
| template<typename Segments, typename Condition, typename Function> | |
| void | forAllElementsIf (const Segments &segments, Condition condition, Function function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over all elements of all segments based on a condition. | |
| template<typename Segments, typename Function> | |
| void | forAllSegments (const Segments &segments, Function &&function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over all segments and applies the given lambda function to each segment. | |
| template<typename Segments, typename SegmentCondition, typename Function> | |
| void | forAllSegmentsIf (const Segments &segments, SegmentCondition &&segmentCondition, Function &&function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over all segments, applying a condition to determine whether each segment should be processed. | |
| template<typename Segments, typename Array, typename Function> | |
| void | forElements (const Segments &segments, const Array &segmentIndexes, Function function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over all elements of segments with the given indexes and applies the specified lambda function. | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Function> | |
| void | forElements (const Segments &segments, IndexBegin begin, IndexEnd end, Function &&function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over all elements in the given range of segments and applies the specified lambda function. . | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Condition, typename Function> | |
| void | forElementsIf (const Segments &segments, IndexBegin begin, IndexEnd end, Condition condition, Function function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over all elements in a given range of segments based on a condition. | |
| template<typename Segments, typename Array, typename Function, typename T = std::enable_if_t< IsArrayType< Array >::value >> | |
| void | forSegments (const Segments &segments, const Array &segmentIndexes, Function &&function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over segments with the given indexes and applies the specified lambda function to each segment. | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Function, typename T = std::enable_if_t< std::is_integral_v< IndexBegin > && std::is_integral_v< IndexEnd > >> | |
| void | forSegments (const Segments &segments, IndexBegin begin, IndexEnd end, Function &&function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over segments within the specified range of segment indexes and applies the given lambda function to each segment. | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename SegmentCondition, typename Function, typename T = std::enable_if_t< std::is_integral_v< IndexBegin > && std::is_integral_v< IndexEnd > >> | |
| void | forSegmentsIf (const Segments &segments, IndexBegin begin, IndexEnd end, SegmentCondition &&segmentCondition, Function &&function, LaunchConfiguration launchConfig=Algorithms::Segments::LaunchConfiguration()) |
| Iterates in parallel over segments within the given range of segment indexes, applying a condition to determine whether each segment should be processed. | |
| template<typename Segments, typename Fetch, typename Reduce, typename Write> | |
| void | inclusiveScanAllSegments (const Segments &segments, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute inclusive prefix-sum (scan) within all segments. . | |
| template<typename Segments, typename Condition, typename Fetch, typename Reduce, typename Write> | |
| void | inclusiveScanAllSegmentsIf (const Segments &segments, Condition &&condition, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute inclusive conditional prefix-sum (scan) within all segments. . | |
| template<typename SegmentView, typename Fetch, typename Reduce, typename Write> | |
| __cuda_callable__ void | inclusiveScanSegment (SegmentView &segment, Fetch &&fetch, Reduce &&reduce, Write &&write) |
| Computes an inclusive scan (or prefix sum) within a segment. . | |
| template<typename Segments, typename Array, typename Fetch, typename Reduce, typename Write> | |
| void | inclusiveScanSegments (const Segments &segments, const Array &segmentIndexes, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute inclusive prefix-sum (scan) within segments specified by a segment index array. . | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Fetch, typename Reduce, typename Write, typename T = std::enable_if_t< std::is_integral_v< IndexBegin > && std::is_integral_v< IndexEnd > >> | |
| void | inclusiveScanSegments (const Segments &segments, IndexBegin begin, IndexEnd end, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute inclusive prefix-sum (scan) within specified segments in a range. . | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Condition, typename Fetch, typename Reduce, typename Write, typename T = typename std::enable_if_t< std::is_integral_v< IndexBegin > && std::is_integral_v< IndexEnd > >> | |
| void | inclusiveScanSegmentsIf (const Segments &segments, IndexBegin begin, IndexEnd end, Condition &&condition, Fetch &&fetch, Reduce &&reduce, Write &&write, LaunchConfiguration launchConfig=LaunchConfiguration()) |
| Compute inclusive conditional prefix-sum (scan) within specified segments in a range. . | |
| template<typename Segments, typename T = std::enable_if_t< isSegments_v< Segments > >> | |
| std::ostream & | operator<< (std::ostream &str, const Segments &segments) |
| Insertion operator of segments to output stream. | |
| template<typename Segments, typename Fetch, std::enable_if_t< isSegments_v< Segments >, bool > = true> | |
| SegmentsPrinter< typename Segments::ConstViewType, Fetch > | print (const Segments &segments, Fetch fetch) |
| Print segments sizes, i.e. the segments setup. | |
| template<typename Segments> | |
| std::ostream & | printSegments (std::ostream &str, const Segments &segments) |
| Print segments sizes, i.e. the segments setup. | |
| template<typename Segments, typename Fetch> | |
| std::ostream & | printSegments (std::ostream &str, const Segments &segments, Fetch &&fetch) |
| template<typename SegmentView, typename Fetch, typename Compare, typename Swap> | |
| __cuda_callable__ void | segmentInsertionSort (SegmentView segment, Fetch &&fetch, Compare &&compare, Swap &&swap) |
| Sorts a segment using insertion sort. . | |
| template<typename Segments, typename Function> | |
| void | sequentialForAllSegments (const Segments &segments, Function &&function) |
| Iterates in parallel over all segments and call given lambda function for each segment. | |
| template<typename Segments, typename IndexBegin, typename IndexEnd, typename Function> | |
| void | sequentialForSegments (const Segments &segments, IndexBegin begin, IndexEnd end, Function &&function) |
| Iterates sequentially over segments in given range of segment indexes and call given lambda function for each segment. | |
Variables | |
| template<typename Segments> | |
| constexpr bool | isAdaptiveCSRSegments_v = isAdaptiveCSRSegments< Segments >::value |
| Returns true if the given type is AdaptiveCSR segments. | |
| template<typename Segments> | |
| constexpr bool | isChunkedEllpackSegments_v = isChunkedEllpackSegments< Segments >::value |
| Returns true if the given type is ChunkedEllpack segments. | |
| template<typename Segments> | |
| constexpr bool | isCSRSegments_v = isCSRSegments< Segments >::value |
| Returns true if the given type is CSR segments. | |
| template<typename Segments> | |
| constexpr bool | isEllpackSegments_v = isEllpackSegments< Segments >::value |
| Returns true if the given type is Ellpack segments. | |
| template<typename Segments> | |
| constexpr bool | isSegments_v = HasGetSegmentCountMethod< Segments >::value |
| template<typename Segments> | |
| constexpr bool | isSlicedEllpackSegments_v = isSlicedEllpackSegments< Segments >::value |
| Returns true if the given type is SlicedEllpack segments. | |
| template<typename Segments> | |
| constexpr bool | isSortedSegments_v = isSortedSegments< Segments >::value |
| Returns true if the given type is CSR segments. | |
Namespace for the segments data structures.
| using TNL::Algorithms::Segments::ColumnMajorBiEllpack = BiEllpack< Device, Index, IndexAllocator, ColumnMajorOrder, WarpSize > |
Alias for column-major BiEllpack segments.
See TNL::Algorithms::Segments::BiEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::ColumnMajorBiEllpackView = BiEllpackView< Device, Index, ColumnMajorOrder, WarpSize > |
Alias for column-major BiEllpack segments view.
See TNL::Algorithms::Segments::BiEllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::ColumnMajorChunkedEllpack = ChunkedEllpack< Device, Index, IndexAllocator, ColumnMajorOrder > |
Alias for column-major ChunkedEllpack segments.
See TNL::Algorithms::Segments::ChunkedEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::ColumnMajorChunkedEllpackView = ChunkedEllpackView< Device, Index, ColumnMajorOrder > |
Alias for column-major ChunkedEllpack segments view.
See TNL::Algorithms::Segments::ChunkedEllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::ColumnMajorEllpack = Ellpack< Device, Index, IndexAllocator, ColumnMajorOrder, Alignment > |
Alias for column-major Ellpack segments.
See TNL::Algorithms::Segments::Ellpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::ColumnMajorEllpackView = EllpackView< Device, Index, ColumnMajorOrder, Alignment > |
Alias for column-major Ellpack segments view.
See TNL::Algorithms::Segments::EllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::ColumnMajorSlicedEllpack = SlicedEllpack< Device, Index, IndexAllocator, ColumnMajorOrder, SliceSize > |
Alias for column-major SlicedEllpack segments.
See TNL::Algorithms::Segments::SlicedEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::ColumnMajorSlicedEllpackView = SlicedEllpackView< Device, Index, ColumnMajorOrder, SliceSize > |
Alias for column-major SlicedEllpack segments view.
See TNL::Algorithms::Segments::SlicedEllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| SliceSize | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::RowMajorBiEllpack = BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize > |
Alias for row-major BiEllpack segments.
See TNL::Algorithms::Segments::BiEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::RowMajorBiEllpackView = BiEllpackView< Device, Index, RowMajorOrder, WarpSize > |
Alias for row-major BiEllpack segments view.
See TNL::Algorithms::Segments::BiEllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::RowMajorChunkedEllpack = ChunkedEllpack< Device, Index, IndexAllocator, RowMajorOrder > |
Alias for row-major ChunkedEllpack segments.
See TNL::Algorithms::Segments::ChunkedEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::RowMajorChunkedEllpackView = ChunkedEllpackView< Device, Index, RowMajorOrder > |
Alias for row-major ChunkedEllpack segments view.
See TNL::Algorithms::Segments::ChunkedEllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::RowMajorEllpack = Ellpack< Device, Index, IndexAllocator, RowMajorOrder, Alignment > |
Alias for row-major Ellpack segments.
See TNL::Algorithms::Segments::Ellpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::RowMajorEllpackView = EllpackView< Device, Index, RowMajorOrder, Alignment > |
Alias for row-major Ellpack segments view.
See TNL::Algorithms::Segments::EllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::RowMajorSlicedEllpack = SlicedEllpack< Device, Index, IndexAllocator, RowMajorOrder, SliceSize > |
Alias for row-major SlicedEllpack segments.
See TNL::Algorithms::Segments::SlicedEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::RowMajorSlicedEllpackView = SlicedEllpackView< Device, Index, RowMajorOrder, SliceSize > |
Alias for row-major SlicedEllpack segments view.
See TNL::Algorithms::Segments::SlicedEllpackView for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| SliceSize | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::SortedAdaptiveCSR = SortedSegments< AdaptiveCSR< Device, Index, IndexAllocator > > |
Alias for sorted segments based on AdaptiveCSR segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedAdaptiveCSRView = SortedSegmentsView< AdaptiveCSRView< Device, Index > > |
Alias for sorted segments based on CSR segments.
| Device | is type of device where the segments will be operating. |
| Index | is type for indexing of the elements managed by the segments. |
| using TNL::Algorithms::Segments::SortedBiEllpack = SortedSegments< BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize > > |
Alias for sorted segments based on BiEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedBiEllpackView = SortedSegmentsView< BiEllpackView< Device, Index, Organization, WarpSize > > |
Alias for sorted segments based on BiEllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedChunkedEllpack = SortedSegments< ChunkedEllpack< Device, Index, IndexAllocator, Organization > > |
Alias for sorted segments based on ChunkedEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedChunkedEllpackView = SortedSegmentsView< ChunkedEllpackView< Device, Index, Organization > > |
Alias for sorted segments based on ChunkedEllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedColumnMajorBiEllpack = SortedSegments< ColumnMajorBiEllpack< Device, Index, IndexAllocator, WarpSize > > |
Alias for sorted segments based on column-major BiEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedColumnMajorBiEllpackView = SortedSegmentsView< ColumnMajorBiEllpackView< Device, Index, WarpSize > > |
Alias for sorted segments based on column-major BiEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedColumnMajorChunkedEllpack = SortedSegments< ColumnMajorChunkedEllpack< Device, Index, IndexAllocator > > |
Alias for sorted segments based on column-major ChunkedEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedColumnMajorChunkedEllpackView = SortedSegmentsView< ColumnMajorChunkedEllpackView< Device, Index > > |
Alias for sorted segments based on column-major ChunkedEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedColumnMajorEllpack = SortedSegments< ColumnMajorEllpack< Device, Index, IndexAllocator, Alignment > > |
Alias for sorted segments based on column-major Ellpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::SortedColumnMajorEllpackView = SortedSegmentsView< ColumnMajorEllpackView< Device, Index, Alignment > > |
Alias for sorted segments based on column-major Ellpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedColumnMajorSlicedEllpack = SortedSegments< ColumnMajorSlicedEllpack< Device, Index, IndexAllocator, SliceSize > > |
Alias for sorted column-major SlicedEllpack segments.
See TNL::Algorithms::Segments::SlicedEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedColumnMajorSlicedEllpackView = SortedSegmentsView< ColumnMajorSlicedEllpackView< Device, Index, SliceSize > > |
Alias for sorted segments based on column-major SlicedEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| SliceSize | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::SortedCSR = SortedSegments< CSR< Device, Index, IndexAllocator > > |
Alias for sorted segments based on CSR segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedCSRView = SortedSegmentsView< CSRView< Device, Index > > |
Alias for sorted segments based on CSR segments.
| Device | is type of device where the segments will be operating. |
| Index | is type for indexing of the elements managed by the segments. |
| using TNL::Algorithms::Segments::SortedEllpack = SortedSegments< Ellpack< Device, Index, IndexAllocator, Organization, Alignment > > |
Alias for sorted segments based on Ellpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::SortedEllpackView = SortedSegmentsView< EllpackView< Device, Index, Organization, Alignment > > |
Alias for sorted segments based on EllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedRowMajorBiEllpack = SortedSegments< RowMajorBiEllpack< Device, Index, IndexAllocator, WarpSize > > |
Alias for sorted segments based on row-major BiEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedRowMajorBiEllpackView = SortedSegmentsView< RowMajorBiEllpackView< Device, Index, WarpSize > > |
Alias for sorted segments based on row-major BiEllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedRowMajorChunkedEllpack = SortedSegments< RowMajorChunkedEllpack< Device, Index, IndexAllocator > > |
Alias for sorted segments based on row-major ChunkedEllpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedRowMajorChunkedEllpackView = SortedSegmentsView< RowMajorChunkedEllpackView< Device, Index > > |
Alias for sorted segments based on row-major ChunkedEllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedRowMajorEllpack = SortedSegments< RowMajorEllpack< Device, Index, IndexAllocator, Alignment > > |
Alias for sorted segments based on row-major Ellpack segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| Alignment | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::SortedRowMajorEllpackView = SortedSegmentsView< RowMajorEllpackView< Device, Index, Alignment > > |
Alias for sorted segments based on row-major EllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedRowMajorSlicedEllpack = SortedSegments< RowMajorSlicedEllpack< Device, Index, IndexAllocator, SliceSize > > |
Alias sorted for row-major SlicedEllpack segments.
See TNL::Algorithms::Segments::SlicedEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedRowMajorSlicedEllpackView = SortedSegmentsView< RowMajorSlicedEllpackView< Device, Index, SliceSize > > |
Alias for sorted segments based on row-major SlicedEllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| SliceSize | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
| using TNL::Algorithms::Segments::SortedSlicedEllpack = SortedSegments< SlicedEllpack< Device, Index, IndexAllocator, Organization, SliceSize > > |
Alias for sorted SlicedEllpack segments.
See TNL::Algorithms::Segments::SlicedEllpack for more details.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| using TNL::Algorithms::Segments::SortedSlicedEllpackView = SortedSegmentsView< SlicedEllpackView< Device, Index, Organization, SliceSize > > |
Alias for sorted segments based on SlicedEllpackView segments.
| Device | The type of device on which the segments will operate. |
| Index | The type used for indexing elements managed by the segments. |
| IndexAllocator | The allocator used for managing index containers. |
| SliceSize | The alignment of the number of segments (to optimize data alignment, particularly on GPUs). |
|
strong |
Enumeration for mapping threads to segments.
This enumeration defines how threads are mapped to segments during parallel operations. It includes options for mapping one thread per segment, one warp per segment, and user-defined mappings.
| void TNL::Algorithms::Segments::exclusiveScanAllSegments | ( | const Segments & | segments, |
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute exclusive prefix-sum (scan) within all segments. .
This is a convenience function that computes exclusive prefix-sum in all segments. It internally calls exclusiveScanSegments with the full range of segments.
| Segments | Type of the segments container. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| void TNL::Algorithms::Segments::exclusiveScanAllSegmentsIf | ( | const Segments & | segments, |
| Condition && | condition, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute exclusive conditional prefix-sum (scan) within all segments. .
This is a convenience function that computes exclusive prefix-sum in all segments, but only for elements that satisfy the given condition. It internally calls exclusiveScanSegmentsIf with the full range of segments.
| Segments | Type of the segments container. |
| Condition | Type of the condition function. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| condition | Function that returns true for elements to include in scan. See Condition Lambda. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| __cuda_callable__ void TNL::Algorithms::Segments::exclusiveScanSegment | ( | SegmentView & | segment, |
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write ) |
Computes an exclusive scan (or prefix sum) within a segment. .
| SegmentView | Type of the segment view. |
| Fetch | Type of the fetch function. |
| Reduce | is a type of function performing the reduction. |
| Write | Type of the write function. |
| segment | The segment view to scan. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| void TNL::Algorithms::Segments::exclusiveScanSegments | ( | const Segments & | segments, |
| const Array & | segmentIndexes, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute exclusive prefix-sum (scan) within all segments specified by a segment index array. .
This is a convenience function that computes exclusive prefix-sum in all segments specified by the segmentIndexes array. It internally calls exclusiveScanSegments with the full range of the segment index array.
| Segments | Type of the segments container. |
| Array | Type of the segment indexes array. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| segmentIndexes | Array containing indices of segments to scan. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| void TNL::Algorithms::Segments::exclusiveScanSegments | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute exclusive prefix-sum (scan) within specified segments in a range. .
This function computes exclusive prefix-sum within segments in the range [ begin, end). Each segment is processed independently using sequential scan. The scan operation is performed based on the provided fetch, reduce, and write functions.
| Segments | Type of the segments container. |
| IndexBegin | Type of the begin index. |
| IndexEnd | Type of the end index. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| begin | The beginning of the range of segments to scan. |
| end | The end of the range of segments to scan. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| void TNL::Algorithms::Segments::exclusiveScanSegmentsIf | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Condition && | condition, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute exclusive conditional prefix-sum (scan) within specified segments in a range. .
This function computes exclusive prefix-sum within segments in the range [ begin, end), but only for elements that satisfy the given condition. Each segment is processed independently using sequential scan.
| Segments | Type of the segments container. |
| IndexBegin | Type of the begin index. |
| IndexEnd | Type of the end index. |
| Condition | Type of the condition function. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| begin | The beginning of the range of segments to scan. |
| end | The end of the range of segments to scan. |
| condition | Function that returns true for elements to include in scan. See Condition Lambda. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| void TNL::Algorithms::Segments::forAllElements | ( | const Segments & | segments, |
| Function && | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over all elements of all segments and applies the specified lambda function.
See also: Overview of Segment Traversal Functions
| Segments | The type of the segments. |
| Function | The type of the lambda function to be applied to each element. |
| segments | The segments whose elements will be processed using the lambda function. |
| function | The lambda function to be applied to each element. See Full Form (With All Parameters) or Brief Form (Without Local Index). |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forAllElementsIf | ( | const Segments & | segments, |
| Condition | condition, | ||
| Function | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over all elements of all segments based on a condition.
See also: Overview of Segment Traversal Functions
For each segment, a condition lambda function is evaluated based on the segment index. If the condition lambda function returns true, all elements of the segment are traversed, and the specified lambda function is applied to each element. If the condition lambda function returns false, the segment is skipped.
| Segments | The type of the segments. |
| Condition | The type of the condition lambda function. |
| Function | The type of the lambda function to be applied to each element. |
| segments | The segments whose elements will be processed using the lambda function. |
| condition | Lambda function for condition checking. See Condition Check. |
| function | The lambda function to be applied to each element. See Full Form (With All Parameters) or Brief Form (Without Local Index). |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forAllSegments | ( | const Segments & | segments, |
| Function && | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over all segments and applies the given lambda function to each segment.
See also: Overview of Segment Traversal Functions
| Segments | The type of the segments. |
| Function | The type of the lambda function to be executed on each segment. |
| segments | The segments on which the lambda function will be applied. |
| function | The lambda function to be applied to each segment. See Segment View Lambda. |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forAllSegmentsIf | ( | const Segments & | segments, |
| SegmentCondition && | segmentCondition, | ||
| Function && | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over all segments, applying a condition to determine whether each segment should be processed.
See also: Overview of Segment Traversal Functions
For each segment, a condition lambda function is evaluated based on the segment index. If the condition lambda function returns true, the specified lambda function is executed for the segment. If the condition lambda function returns false, the segment is skipped.
| Segments | The type of the segments. |
| SegmentCondition | The type of the condition lambda function. |
| Function | The type of the lambda function to be executed on each segment. |
| segments | The segments on which the lambda function will be applied. |
| segmentCondition | Lambda function for condition checking. See Condition Check. |
| function | The lambda function to be applied to each segment. See Segment View Lambda. |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forElements | ( | const Segments & | segments, |
| const Array & | segmentIndexes, | ||
| Function | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over all elements of segments with the given indexes and applies the specified lambda function.
See also: Overview of Segment Traversal Functions
| Segments | The type of the segments. |
| Array | The type of the array containing the indexes of the segments to iterate over. This can be containers such as TNL::Containers::Array, TNL::Containers::ArrayView, TNL::Containers::Vector, or TNL::Containers::VectorView. |
| Function | The type of the lambda function to be applied to each element. |
| segments | The segments whose elements will be processed using the lambda function. |
| segmentIndexes | The array containing the indexes of the segments to iterate over. |
| function | The lambda function to be applied to each element. See Full Form (With All Parameters) or Brief Form (Without Local Index). |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forElements | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Function && | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over all elements in the given range of segments and applies the specified lambda function. .
See also: Overview of Segment Traversal Functions
| Segments | The type of the segments. |
| IndexBegin | The type of the index defining the beginning of the interval [ begin, end ) of segments whose elements we want to process using the lambda function. |
| IndexEnd | The type of the index defining the end of the interval [ begin, end ) of segments whose elements we want to process using the lambda function. |
| Function | The type of the lambda function to be applied to each element. |
| segments | The segments whose elements will be processed using the lambda function. |
| begin | The beginning of the interval [ begin, end ) of segments whose elements will be processed using the lambda function. |
| end | The end of the interval [ begin, end ) of segments whose elements will be processed using the lambda function. |
| function | The lambda function to be applied to each element. See Full Form (With All Parameters) or Brief Form (Without Local Index). |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forElementsIf | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Condition | condition, | ||
| Function | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over all elements in a given range of segments based on a condition.
See also: Overview of Segment Traversal Functions
For each segment, a condition lambda function is evaluated based on the segment index. If the condition lambda function returns true, all elements of the segment are traversed, and the specified lambda function is applied to each element. If the condition lambda function returns false, the segment is skipped.
| Segments | The type of the segments. |
| IndexBegin | The type of the index defining the beginning of the interval [ begin, end ) of segments whose elements will be processed using the lambda function. |
| IndexEnd | The type of the index defining the end of the interval [ begin, end ) of segments whose elements will be processed using the lambda function. |
| Condition | The type of the condition lambda function. |
| Function | The type of the lambda function to be applied to each element. |
| segments | The segments whose elements will be processed using the lambda function. |
| begin | The beginning of the interval [ begin, end ) of segments whose elements will be processed using the lambda function. |
| end | The end of the interval [ begin, end ) of segments whose elements will be processed using the lambda function. |
| condition | Lambda function for condition checking. See Condition Check. |
| function | The lambda function to be applied to each element. See Full Form (With All Parameters) or Brief Form (Without Local Index). |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forSegments | ( | const Segments & | segments, |
| const Array & | segmentIndexes, | ||
| Function && | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over segments with the given indexes and applies the specified lambda function to each segment.
See also: Overview of Segment Traversal Functions
| Segments | The type of the segments. |
| Array | The type of the array containing the indexes of the segments to iterate over. This can be containers such as TNL::Containers::Array, TNL::Containers::ArrayView, TNL::Containers::Vector, or TNL::Containers::VectorView. |
| Function | The type of the lambda function to be executed on each segment. |
| segments | The segments on which the lambda function will be applied. |
| segmentIndexes | The array containing the indexes of the segments to iterate over. |
| function | The lambda function to be applied to each segment. See Segment View Lambda. |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forSegments | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Function && | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over segments within the specified range of segment indexes and applies the given lambda function to each segment.
See also: Overview of Segment Traversal Functions
| Segments | The type of the segments. |
| IndexBegin | The type of the index defining the beginning of the interval [ begin, end ) of segments on which the lambda function will be applied. |
| IndexEnd | The type of the index defining the end of the interval [ begin, end ) of segments on which the lambda function will be applied. |
| Function | The type of the lambda function to be executed on each segment. |
| segments | The segments on which the lambda function will be applied. |
| begin | The beginning of the interval [ begin, end ) of segments that will be processed using the lambda function. |
| end | The end of the interval [ begin, end ) of segments that will be processed using the lambda function. |
| function | The lambda function to be applied to each segment. See Segment View Lambda. |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::forSegmentsIf | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| SegmentCondition && | segmentCondition, | ||
| Function && | function, | ||
| LaunchConfiguration | launchConfig = Algorithms::Segments::LaunchConfiguration() ) |
Iterates in parallel over segments within the given range of segment indexes, applying a condition to determine whether each segment should be processed.
See also: Overview of Segment Traversal Functions
For each segment, a condition lambda function is evaluated based on the segment index. If the condition lambda function returns true, the specified lambda function is executed for the segment. If the condition lambda function returns false, the segment is skipped.
| Segments | The type of the segments. |
| IndexBegin | The type of the index defining the beginning of the interval [ begin, end ) of segments on which the lambda function will be applied. |
| IndexEnd | The type of the index defining the end of the interval [ begin, end ) of segments on which the lambda function will be applied. |
| SegmentCondition | The type of the condition lambda function. |
| Function | The type of the lambda function to be executed on each segment. |
| segments | The segments on which the lambda function will be applied. |
| begin | The beginning of the interval [ begin, end ) of segment indexes whose corresponding segments will be processed using the lambda function. |
| end | The end of the interval [ begin, end ) of segment indexes whose corresponding segments will be processed using the lambda function. |
| segmentCondition | Lambda function for condition checking. See Condition Check. |
| function | The lambda function to be applied to each segment. See Segment View Lambda. |
| launchConfig | The configuration of the launch - see TNL::Algorithms::Segments::LaunchConfiguration. |
| void TNL::Algorithms::Segments::inclusiveScanAllSegments | ( | const Segments & | segments, |
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute inclusive prefix-sum (scan) within all segments. .
This is a convenience function that computes inclusive prefix-sum in all segments. It internally calls inclusiveScanSegments with the full range of segments.
| Segments | Type of the segments container. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| void TNL::Algorithms::Segments::inclusiveScanAllSegmentsIf | ( | const Segments & | segments, |
| Condition && | condition, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute inclusive conditional prefix-sum (scan) within all segments. .
This is a convenience function that computes inclusive prefix-sum in all segments, but only for elements that satisfy the given condition. It internally calls inclusiveScanSegmentsIf with the full range of segments.
| Segments | Type of the segments container. |
| Condition | Type of the condition function. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| condition | Function that returns true for elements to include in scan. See Condition Lambda. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| __cuda_callable__ void TNL::Algorithms::Segments::inclusiveScanSegment | ( | SegmentView & | segment, |
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write ) |
Computes an inclusive scan (or prefix sum) within a segment. .
| SegmentView | Type of the segment view. |
| Fetch | Type of the fetch function. |
| Reduce | is a type of function performing the reduction. |
| Write | Type of the write function. |
| segment | The segment view to scan. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| void TNL::Algorithms::Segments::inclusiveScanSegments | ( | const Segments & | segments, |
| const Array & | segmentIndexes, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute inclusive prefix-sum (scan) within segments specified by a segment index array. .
This is a convenience function that computes inclusive prefix-sum in segments specified by the segmentIndexes array. It internally calls inclusiveScanSegments with the full range of the segment index array.
| Segments | Type of the segments container. |
| Array | Type of the segment indexes array. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| segmentIndexes | Array containing indices of segments to scan. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| void TNL::Algorithms::Segments::inclusiveScanSegments | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute inclusive prefix-sum (scan) within specified segments in a range. .
This function computes inclusive prefix-sum within segments in the range [ begin, end). Each segment is processed independently using sequential scan. The scan operation is performed based on the provided fetch, reduce, and write functions.
| Segments | Type of the segments container. |
| IndexBegin | Type of the begin index. |
| IndexEnd | Type of the end index. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| begin | The beginning of the range of segments to scan. |
| end | The end of the range of segments to scan. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| void TNL::Algorithms::Segments::inclusiveScanSegmentsIf | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Condition && | condition, | ||
| Fetch && | fetch, | ||
| Reduce && | reduce, | ||
| Write && | write, | ||
| LaunchConfiguration | launchConfig = LaunchConfiguration() ) |
Compute inclusive conditional prefix-sum (scan) within specified segments in a range. .
This function computes inclusive prefix-sum within segments in the range [ begin, end), but only for elements that satisfy the given condition. Each segment is processed independently using sequential scan.
| Segments | Type of the segments container. |
| IndexBegin | Type of the begin index. |
| IndexEnd | Type of the end index. |
| Condition | Type of the condition function. |
| Fetch | Type of the fetch function. |
| Reduce | is a function object performing the reduction, some Function objects for reduction operations. |
| Write | Type of the write function. |
| segments | The segments container. |
| begin | The beginning of the range of segments to scan. |
| end | The end of the range of segments to scan. |
| condition | Function that returns true for elements to include in scan. See Condition Lambda. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| reduce | Function object performing the reduction. See Reduction Function Object. |
| write | Function to write result at given position. See Write Lambda. |
| launchConfig | Configuration for parallel execution. |
| std::ostream & TNL::Algorithms::Segments::operator<< | ( | std::ostream & | str, |
| const Segments & | segments ) |
Insertion operator of segments to output stream.
| Device | is the device type of the source segments. |
| Index | is the index type of the source segments. |
| IndexAllocator | is the index allocator of the source segments. |
| str | is the output stream. |
| segments | are the source segments. |
| SegmentsPrinter< typename Segments::ConstViewType, Fetch > TNL::Algorithms::Segments::print | ( | const Segments & | segments, |
| Fetch | fetch ) |
Print segments sizes, i.e. the segments setup.
| Segments | is type of segments. |
| Fetch | is type of the lambda function for fetching data. |
| segments | is an instance of segments. |
| fetch | is a lambda function for fetching data. |
| std::ostream & TNL::Algorithms::Segments::printSegments | ( | std::ostream & | str, |
| const Segments & | segments ) |
Print segments sizes, i.e. the segments setup.
| Segments | is type of segments. |
| segments | is an instance of segments. |
| str | is output stream. |
| __cuda_callable__ void TNL::Algorithms::Segments::segmentInsertionSort | ( | SegmentView | segment, |
| Fetch && | fetch, | ||
| Compare && | compare, | ||
| Swap && | swap ) |
Sorts a segment using insertion sort. .
This function sorts the elements of a segment using insertion sort algorithm.
| SegmentView | Type of the segment view. |
| Fetch | Type of the fetch function. |
| Compare | Type of the comparison function. |
| Swap | Type of the swap function. |
| segment | The segment view to be sorted. |
| fetch | Function to fetch element value at given position. See Fetch Lambda. |
| compare | Function to compare two elements. See Compare Lambda. |
| swap | Function to swap two elements. See Swap Lambda. |
This function performs an in-place sort of the segment using the insertion sort algorithm. The sorting is done in ascending order based on the comparison function provided.
| void TNL::Algorithms::Segments::sequentialForAllSegments | ( | const Segments & | segments, |
| Function && | function ) |
Iterates in parallel over all segments and call given lambda function for each segment.
See also: Overview of Segment Traversal Functions
This function is just a sequential variant of TNL::Algorithms::Segments::forAllSegments.
| void TNL::Algorithms::Segments::sequentialForSegments | ( | const Segments & | segments, |
| IndexBegin | begin, | ||
| IndexEnd | end, | ||
| Function && | function ) |
Iterates sequentially over segments in given range of segment indexes and call given lambda function for each segment.
This function is just a sequential variant of TNL::Algorithms::Segments::forSegments.
|
inlineconstexpr |
Returns true if the given type is AdaptiveCSR segments.
| Segments | The type of the segments. |
|
inlineconstexpr |
Returns true if the given type is CSR segments.
| Segments | The type of the segments. |