![]()  | 
  
    Ginkgo
    Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
    
   A numerical linear algebra library targeting many-core architectures 
   | 
 
A minimal interface for a segmented array. More...
#include <ginkgo/core/base/segmented_array.hpp>
Public Member Functions | |
| segmented_array (std::shared_ptr< const Executor > exec) | |
| Create an empty segmented array.  More... | |
| segmented_array (std::shared_ptr< const Executor > exec, const segmented_array &other) | |
| Copies a segmented array to a different executor.  More... | |
| segmented_array (std::shared_ptr< const Executor > exec, segmented_array &&other) | |
| Moves a segmented array to a different executor.  More... | |
| segmented_array (const segmented_array &other) | |
| segmented_array (segmented_array &&other) noexcept(false) | |
| segmented_array & | operator= (const segmented_array &other) | 
| segmented_array & | operator= (segmented_array &&) noexcept(false) | 
| size_type | get_size () const | 
| Get the total size of the stored buffer.  More... | |
| size_type | get_segment_count () const | 
| Get the number of segments.  More... | |
| T * | get_flat_data () | 
| Access to the flat buffer.  More... | |
| const T * | get_const_flat_data () const | 
| Const-access to the flat buffer.  More... | |
| const gko::array< int64 > & | get_offsets () const | 
| Access to the segment offsets.  More... | |
| std::shared_ptr< const Executor > | get_executor () const | 
| Access the executor.  More... | |
Static Public Member Functions | |
| static segmented_array | create_from_sizes (const gko::array< int64 > &sizes) | 
| Creates an uninitialized segmented array with predefined segment sizes.  More... | |
| static segmented_array | create_from_sizes (gko::array< T > buffer, const gko::array< int64 > &sizes) | 
| Creates a segmented array from a flat buffer and segment sizes.  More... | |
| static segmented_array | create_from_offsets (gko::array< int64 > offsets) | 
| Creates an uninitialized segmented array from offsets.  More... | |
| static segmented_array | create_from_offsets (gko::array< T > buffer, gko::array< int64 > offsets) | 
| Creates a segmented array from a flat buffer and offsets.  More... | |
A minimal interface for a segmented array.
The segmented array is stored as a flat buffer with an offsets array. The segment i contains the index range [offset[i], offset[i + 1]) of the flat buffer.
| T | value type stored in the arrays | 
      
  | 
  explicit | 
Create an empty segmented array.
| exec | executor for storage arrays | 
| gko::segmented_array< T >::segmented_array | ( | std::shared_ptr< const Executor > | exec, | 
| const segmented_array< T > & | other | ||
| ) | 
Copies a segmented array to a different executor.
| exec | the executor to copy to | 
| other | the segmented array to copy from | 
| gko::segmented_array< T >::segmented_array | ( | std::shared_ptr< const Executor > | exec, | 
| segmented_array< T > && | other | ||
| ) | 
Moves a segmented array to a different executor.
| exec | the executor to move to | 
| other | the segmented array to move from | 
      
  | 
  static | 
Creates an uninitialized segmented array from offsets.
| offsets | the index offsets for each segment, and the total size of the buffer as last element | 
      
  | 
  static | 
Creates a segmented array from a flat buffer and offsets.
| buffer | the flat buffer whose size has to match the last element of offsets | 
| offsets | the index offsets for each segment, and the total size of the buffer as last element | 
      
  | 
  static | 
Creates an uninitialized segmented array with predefined segment sizes.
| exec | executor for storage arrays | 
| sizes | the sizes of each segment | 
      
  | 
  static | 
Creates a segmented array from a flat buffer and segment sizes.
| buffer | the flat buffer whose size has to match the sum of sizes | 
| sizes | the sizes of each segment | 
| const T* gko::segmented_array< T >::get_const_flat_data | ( | ) | const | 
Const-access to the flat buffer.
| std::shared_ptr<const Executor> gko::segmented_array< T >::get_executor | ( | ) | const | 
Access the executor.
| T* gko::segmented_array< T >::get_flat_data | ( | ) | 
Access to the flat buffer.
| const gko::array<int64>& gko::segmented_array< T >::get_offsets | ( | ) | const | 
Access to the segment offsets.
| size_type gko::segmented_array< T >::get_segment_count | ( | ) | const | 
Get the number of segments.
| size_type gko::segmented_array< T >::get_size | ( | ) | const | 
Get the total size of the stored buffer.
 1.8.16