-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComplexInterleaveClass.h
41 lines (39 loc) · 1.08 KB
/
ComplexInterleaveClass.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#ifndef COMPLEXINTERLEAVECLASS_H
#define COMPLEXINTERLEAVECLASS_H
#include "ComplexCoreClass.h"
TemplateDefinition
class ComplexInterleaveClass : ComplexCoreClass <TemplateParameter>
{
public:
ComplexInterleaveClass()
{
// dont call base class default constructor directly, icc has problem with it.
// default constructor of base class automatically called befor constructor of derived class.
// but parametrized constructor of base class should be called explicitly.
}
ComplexInterleaveClass(MemoryManagerClass *MemoryManager) : BaseConstructor
{
}
Tca Interleave(Tca input, int* interleve_indexes)
{
Tca inter = Tca(input.Length, MemManager);
for (int i = 0; i < input.Length; i++)
{
inter[interleve_indexes[i]] = input[i];
}
inter.Length = input.Length;
return input;
}
Ta Interleave(Ta input, int* interleve_indexes)
{
Ta inter = Tca(input.Length, MemManager);
for (int i = 0; i < input.Length; i++)
{
inter[interleve_indexes[i]] = input[i];
}
inter.Length = input.Length;
return input;
}
};
#endif