|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Declares small test helpers (in namespace psalg) that print and modify arrays and vectors. More...
#include <unistd.h>#include <vector>#include <iostream>Namespaces | |
| namespace | psalg |
| Usage. | |
Functions | |
| template<typename T > | |
| void | psalg::ctest_nda_v2 (T *arr, uint32_t *sh, int &ndim) |
| Test helper: print ndim and the first ndim entries of sh, then print the first 5 elements of arr and add each element's index to it (always 5 elements). | |
| template<typename T > | |
| void | psalg::ctest_nda (T *arr, int r, int c) |
| Test helper: print r, c and the r*c elements of arr to stdout, adding each element's index to it (arr[i] = i + arr[i]). | |
| void | psalg::ctest_nda_f8 (double *arr, int r, int c) |
| Call ctest_nda<double>(arr, r, c). | |
| void | psalg::ctest_nda_i2 (int16_t *arr, int r, int c) |
| Call ctest_nda<int16_t>(arr, r, c). | |
| void | psalg::ctest_nda_u2 (uint16_t *arr, int r, int c) |
| Call ctest_nda<uint16_t>(arr, r, c). | |
| template<typename T > | |
| void | psalg::ctest_vector (vector< T > &v) |
| Test helper: print the size of v, set v[2] to 222 (not range-checked), then print all elements of v to stdout. | |
Declares small test helpers (in namespace psalg) that print and modify arrays and vectors.