Forgotten source catch_aux.C
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
d062ec4da9
commit
8a2d4a2969
|
@ -0,0 +1,24 @@
|
|||
#include "catch_aux.h"
|
||||
#include "complex.h"
|
||||
namespace qpmstest{
|
||||
/// Creates a new vector<double> from complex number array
|
||||
std::vector<double> pointer2dvec(const _Complex double *arr, size_t siz){
|
||||
std::vector<double> vec(2*siz);
|
||||
for(size_t i = 0; i < siz; ++i) {
|
||||
vec[2*i] = creal(arr[i]);
|
||||
vec[2*i+1] = cimag(arr[i]);
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
||||
std::vector<double> pointer2dvec(const double *arr, size_t siz){
|
||||
std::vector<double> vec(siz);
|
||||
for(size_t i = 0; i < siz; ++i)
|
||||
vec[i] = arr[i];
|
||||
return vec;
|
||||
}
|
||||
|
||||
std::vector<double> pointer2dvec(const csphvec_t *arr, size_t siz) {
|
||||
return pointer2dvec(&arr->rc, 3*siz);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue