EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.measurement.strategies.activeresource.cpu]

COVERAGE SUMMARY FOR SOURCE FILE [FFTDemand.java]

nameclass, %method, %block, %line, %
FFTDemand.java0%   (0/1)0%   (0/6)0%   (0/72)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FFTDemand0%   (0/1)0%   (0/6)0%   (0/72)0%   (0/18)
FFTDemand (): void 0%   (0/1)0%   (0/8)0%   (0/2)
cleanup (): void 0%   (0/1)0%   (0/1)0%   (0/1)
fft (int): void 0%   (0/1)0%   (0/26)0%   (0/6)
getName (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getStrategysResource (): ResourceTypeEnum 0%   (0/1)0%   (0/2)0%   (0/1)
run (long): void 0%   (0/1)0%   (0/33)0%   (0/7)

1package de.uka.ipd.sdq.measurement.strategies.activeresource.cpu;
2 
3import de.uka.ipd.sdq.measurement.strategies.activeresource.AbstractDemandStrategy;
4import de.uka.ipd.sdq.measurement.strategies.activeresource.ResourceTypeEnum;
5import flanagan.complex.Complex;
6import flanagan.math.FourierTransform;
7 
8public class FFTDemand extends AbstractDemandStrategy {
9 
10        public FFTDemand() {
11                super(-1,-3,-5,262144,2);
12        }
13 
14        private void fft(int lengthOfDistFunc) {
15                Complex[] points = new Complex[lengthOfDistFunc];
16                for (int i = 0; i < lengthOfDistFunc; i++) {
17                        points[i] = new Complex(Math.random(), 0);
18                }
19                FourierTransform ft = new FourierTransform(points);
20                ft.transform();
21        }
22 
23        @Override
24        public void run(long initial) {
25                int length = (int)initial;
26                if (!FourierTransform.checkPowerOfTwo(length)) {
27                        int next = FourierTransform.nextPowerOfTwo(length);
28                        int last = FourierTransform.lastPowerOfTwo(length);
29                        length = next - length > length - last || next > defaultIterationCount ? last : next;
30                }
31                fft(length);
32        }
33 
34        @Override
35        public ResourceTypeEnum getStrategysResource() {
36                return ResourceTypeEnum.CPU;
37        }
38 
39        @Override
40        public String getName() {
41                return "FFT";
42        }
43        
44        @Override
45        public void cleanup() {
46                // Do nothing.
47        }
48}

[all classes][de.uka.ipd.sdq.measurement.strategies.activeresource.cpu]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov