STORMM Source Documentation
Loading...
Searching...
No Matches
series_ops.h
1// -*-c++-*-
2#ifndef STORMM_SET_OPS_H
3#define STORMM_SET_OPS_H
4
5#include <vector>
6#include "copyright.h"
7#include "Accelerator/hybrid.h"
8#include "Constants/scaling.h"
9#include "DataTypes/common_types.h"
10#include "Parsing/parse.h"
11#include "Parsing/polynumeric.h"
12#include "summation.h"
13#include "vector_ops.h"
14
15namespace stormm {
16namespace stmath {
17
18using card::Hybrid;
19using parse::NumberFormat;
20using parse::realToString;
21
30template <typename T> std::vector<T> incrementingSeries(const T start_value, const T end_value,
31 const T increment = 1);
32
49std::vector<uint> numberSeriesToBitMask(const int* number_series, const size_t length,
50 int output_size = 0);
51
52std::vector<uint> numberSeriesToBitMask(const std::vector<int> &number_series,
53 int output_size = 0);
54
55std::vector<uint> numberSeriesToBitMask(const Hybrid<int> &number_series, int output_size = 0);
57
72std::vector<int> getSubsetIndexPattern(std::vector<int> *x_subset, int x_size,
73 int *n_subset_indices = nullptr);
74
94template <typename T> std::vector<T> extractIndexedValues(const T* original_values,
95 size_t values_length,
96 const std::vector<int> reduced_indices,
97 const int reduced_length = 0);
98
99template <typename T> std::vector<T> extractIndexedValues(const std::vector<T> &original_values,
100 const std::vector<int> reduced_indices,
101 const int reduced_length = 0);
102
103template <typename T> std::vector<T> extractIndexedValues(const Hybrid<T> &original_values,
104 const std::vector<int> reduced_indices,
105 const int reduced_length = 0);
107
129template <typename Tdata, typename Tloc>
130void indexingArray(const Tdata* raw_values, Tloc* value_locations, Tloc* value_bounds,
131 size_t value_count, size_t value_limit);
132
133template <typename Tdata, typename Tloc>
134void indexingArray(const std::vector<Tdata> &raw_values, std::vector<Tloc> *value_locations,
135 std::vector<Tloc> *value_bounds, size_t value_limit = 0);
136
137template <typename Tdata, typename Tloc>
138void indexingArray(const Hybrid<Tdata> &raw_values, Hybrid<Tloc> *value_locations,
139 Hybrid<Tloc> *value_bounds, size_t value_limit = 0);
141
158std::vector<int> enumerateMask(const std::vector<bool> &bitmask);
159
160std::vector<int> enumerateMask(const uint* bitmask, const int length);
161
162std::vector<int> enumerateMask(const std::vector<uint> &bitmask);
163
164std::vector<int> enumerateMask(const Hybrid<uint> &bitmask);
166
167
168} // namespace stmath
169} // namespace stormm
170
171#include "series_ops.tpp"
172
173#endif
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202