|
Ginkgo
Generated from pipelines/1554403166 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
|
8 #include <ginkgo/config.hpp>
9 #include <ginkgo/core/base/array.hpp>
145 template <
typename T>
147 static std::unique_ptr<segmented_array<T>> create(
152 return std::make_unique<segmented_array<T>>(
156 return std::make_unique<segmented_array<T>>(std::move(exec),
162 template <
typename T>
163 struct temporary_clone_helper<const segmented_array<T>> {
164 static std::unique_ptr<const segmented_array<T>> create(
165 std::shared_ptr<const Executor> exec,
const segmented_array<T>* ptr,
168 return std::make_unique<segmented_array<T>>(
175 template <
typename T>
176 class copy_back_deleter<segmented_array<T>>
177 :
public copy_back_deleter_from_assignment<segmented_array<T>> {
179 using copy_back_deleter_from_assignment<
180 segmented_array<T>>::copy_back_deleter_from_assignment;
segmented_array(std::shared_ptr< const Executor > exec)
Create an empty segmented array.
std::size_t size_type
Integral type used for allocation quantities.
Definition: types.hpp:86
static segmented_array create_from_offsets(gko::array< int64 > offsets)
Creates an uninitialized segmented array from offsets.
static segmented_array create_from_sizes(const gko::array< int64 > &sizes)
Creates an uninitialized segmented array with predefined segment sizes.
T * get_flat_data()
Access to the flat buffer.
const gko::array< int64 > & get_offsets() const
Access to the segment offsets.
size_type get_segment_count() const
Get the number of segments.
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
size_type get_size() const
Get the total size of the stored buffer.
const T * get_const_flat_data() const
Const-access to the flat buffer.
std::shared_ptr< const Executor > get_executor() const
Access the executor.
A minimal interface for a segmented array.
Definition: segmented_array.hpp:24
array< ValueType > make_array_view(std::shared_ptr< const Executor > exec, size_type size, ValueType *data)
Helper function to create an array view deducing the value type.
Definition: array.hpp:787