matrixVectorMultiplyBench::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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