Loading...
Searching...
No Matches
IrregularlyPartitionedArray.h
Go to the documentation of this file.
1// BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
2
3#ifndef AWKWARD_IRREGULARLYPARTITIONEDARRAY_H_
4#define AWKWARD_IRREGULARLYPARTITIONEDARRAY_H_
5
7
8namespace awkward {
13 public:
15 const std::vector<int64_t> stops);
16
23 const std::vector<int64_t>
24 stops() const;
25
26 int64_t
27 start(int64_t partitionid) const override;
28
29 int64_t
30 stop(int64_t partitionid) const override;
31
32 void
34 int64_t& partitionid,
35 int64_t& index) const override;
36
38 repartition(const std::vector<int64_t>& stops) const override;
39
40 const std::string
41 classname() const override;
42
43 const std::string
44 tostring() const override;
45
46 int64_t
47 length() const override;
48
50 shallow_copy() const override;
51
53 copy_to(kernel::lib ptr_lib) const override;
54
55 private:
56 const std::vector<int64_t> stops_;
57 };
58}
59
60#endif // AWKWARD_IRREGULARLYPARTITIONEDARRAY_H_
PartitionedArray of arbitrary length partitions.
Definition: IrregularlyPartitionedArray.h:12
const std::string tostring() const override
Returns a string representation of this array (multi-line XML).
int64_t stop(int64_t partitionid) const override
Logical stopping index for a given partitionid.
const std::vector< int64_t > stops() const
Logical index where each partition ends.
void partitionid_index_at(int64_t at, int64_t &partitionid, int64_t &index) const override
Gets the partitionid and index for a given logical position in the full array, without handling negat...
int64_t length() const override
The length of the full array, summed over all partitions.
const PartitionedArrayPtr copy_to(kernel::lib ptr_lib) const override
Recursively copies components of the array from main memory to a GPU (if ptr_lib == kernel::lib::cuda...
const PartitionedArrayPtr shallow_copy() const override
Copies this node without copying any nodes hierarchically nested within it or any array/index/identit...
int64_t start(int64_t partitionid) const override
Logical starting index for a given partitionid.
IrregularlyPartitionedArray(const ContentPtrVec &partitions, const std::vector< int64_t > stops)
PartitionedArrayPtr repartition(const std::vector< int64_t > &stops) const override
Returns this array with a specified (irregular) partitioning.
const std::string classname() const override
User-friendly name of this class.
Abstract superclass of all PartitionedArray node types. PartitionedArrays contain a list of Content,...
Definition: PartitionedArray.h:17
#define LIBAWKWARD_EXPORT_SYMBOL
Definition: common.h:45
lib
Definition: kernel-dispatch.h:20
Definition: BitMaskedArray.h:15
std::vector< std::shared_ptr< Content > > ContentPtrVec
Definition: Content.h:16
std::shared_ptr< PartitionedArray > PartitionedArrayPtr
Definition: PartitionedArray.h:10