Skip to content
Snippets Groups Projects
Commit 4bb6d851 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

add interleave functionality

parent 472ac086
No related branches found
No related tags found
No related merge requests found
......@@ -227,6 +227,17 @@ int field_descriptor::transpose(
return EXIT_SUCCESS;
}
int field_descriptor::interleave(
float *input,
float *output,
int dim)
{
for (int k = 0; k < this->local_size; k++)
for (int j = 0; j < dim; j++)
output[k*dim + j] = input[j*this->local_size + k];
return EXIT_SUCCESS;
}
field_descriptor* field_descriptor::get_transpose()
{
int n[this->ndims];
......
......@@ -54,6 +54,11 @@ class field_descriptor
fftwf_complex *input,
fftwf_complex *output = NULL);
int interleave(
float *input,
float *output,
int dim);
inline int rank(int i0)
{
return i0 / this->subsizes[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment