ls1-MarDyn
ls1-MarDyn molecular dynamics code
FFTDataContainer_scalBlocks.h
1/*
2 * FFTDataContainer_scalBlocks.h
3 *
4 * Created on: Mar 16, 2016
5 * Author: gallardjm
6 */
7#ifndef FFTDATA_SCALBLOCK_H_
8#define FFTDATA_SCALBLOCK_H_
9
10#include "bhfmm/fft/FFTSettings_preprocessor.h" //tmp include for the typedef FFT_precision
11#include "bhfmm/fft/FFTDataContainer.h"
12#include "bhfmm/fft/tools/fft_utils.h"
13#include <stdlib.h>
14
15/*
16 * Storage for blocks, can be used with scaling Blocks (scalBlock)
17 *
18 * blocks[i] is an array reprensenting the ith block
19 * Convention: block 0 contain the terms of lowest order
20 * => source matrix in ascending block (block 0 is the top of the matrix),
21 * tf and target matrices in descending blocks (block 0 is the lower part of the matrix)
22 */
24
25public:
26 FFTDataContainer_scalBlocks(int nbBlocks, int nx, int ny, bool scal,
27 int* blockSize) :
28 _nbBlocks(nbBlocks), _nx(nx), _ny(ny), _scal(scal), _blockSize(
29 blockSize) {
30 }
31
32 FFT_precision** Re;
33 FFT_precision** Im;
34 int _nbBlocks;
35 int _nx;
36 int _ny;
37 bool _scal;
38 int* _blockSize;
39
41 delete_blocks_arr(Re, _nbBlocks);
42 delete_blocks_arr(Im, _nbBlocks);
43 }
44
47 _nbBlocks, _nx, _ny, _scal, _blockSize);
48 if (_scal) {
49 copy->Re = copy_scalBlocks_arr(Re, _nbBlocks, _nx, _blockSize);
50 copy->Im = copy_scalBlocks_arr(Im, _nbBlocks, _nx, _blockSize);
51 } else {
52 copy->Re = copy_blocks_arr(Re, _nbBlocks, _nx, _ny);
53 copy->Im = copy_blocks_arr(Im, _nbBlocks, _nx, _ny);
54 }
55
56 return copy;
57 }
58};
59
60#endif
Definition: FFTDataContainer_scalBlocks.h:23
FFTDataContainer * copyContainer()
Definition: FFTDataContainer_scalBlocks.h:45
Definition: FFTDataContainer.h:14