Passed
Push — main ( 16ad7b...83c0b8 )
by Shubham
01:42
created

matrixConvolveBench::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Np\benchmarks\matrix\signalProcessing;
4
5
use Np\matrix;
6
7
/**
8
 * @Groups({"Signal Processing"})
9
 * @BeforeMethods({"setUp"})
10
 */
11
class matrixConvolveBench {
12
13
    /**
14
     * @var \Np\matrix
15
     */
16
    protected $a;
17
18
    /**
19
     * @var \Np\Matrix
20
     */
21
    protected $kernel;
22
23
    public function setUp(): void {
24
        $this->a = matrix::uniform(500, 500);
25
26
        $this->kernel = matrix::uniform(10, 10);
27
    }
28
29
    /**
30
     * @Subject
31
     * @Iterations(5)
32
     * @revs(5)
33
     * @OutputTimeUnit("seconds", precision=3)
34
     */
35
    public function convolve(): void {
36
        $this->a->convolve($this->kernel);
37
    }
38
39
}
40