1 #include "BinaryF16.h"
2 #include "Error.h"
3 
4 
test_mat_mult_f16()5     void BinaryF16::test_mat_mult_f16()
6     {
7       arm_mat_mult_f16(&this->in1,&this->in2,&this->out);
8     }
9 
10 
test_mat_cmplx_mult_f16()11     void BinaryF16::test_mat_cmplx_mult_f16()
12     {
13       arm_mat_cmplx_mult_f16(&this->in1,&this->in2,&this->out);
14     }
15 
16 
setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)17     void BinaryF16::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
18     {
19 
20 
21        std::vector<Testing::param_t>::iterator it = params.begin();
22        this->nbr = *it++;
23        this->nbi = *it++;
24        this->nbc = *it;
25 
26        switch(id)
27        {
28           case BinaryF16::TEST_MAT_CMPLX_MULT_F16_2:
29             input1.reload(BinaryF16::INPUTAC_F16_ID,mgr,2*this->nbr*this->nbi);
30             input2.reload(BinaryF16::INPUTBC_F16_ID,mgr,2*this->nbi*this->nbc);
31             output.create(2*this->nbr*this->nbc,BinaryF16::OUT_F16_ID,mgr);
32           break;
33 
34           default:
35             input1.reload(BinaryF16::INPUTA_F16_ID,mgr,this->nbr*this->nbi);
36             input2.reload(BinaryF16::INPUTB_F16_ID,mgr,this->nbi*this->nbc);
37             output.create(this->nbr*this->nbc,BinaryF16::OUT_F16_ID,mgr);
38 
39        }
40 
41 
42 
43 
44        this->in1.numRows = this->nbr;
45        this->in1.numCols = this->nbi;
46        this->in1.pData = input1.ptr();
47 
48        this->in2.numRows = this->nbi;
49        this->in2.numCols = this->nbc;
50        this->in2.pData = input2.ptr();
51 
52        this->out.numRows = this->nbr;
53        this->out.numCols = this->nbc;
54        this->out.pData = output.ptr();
55     }
56 
tearDown(Testing::testID_t id,Client::PatternMgr * mgr)57     void BinaryF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
58     {
59        (void)id;
60        (void)mgr;
61     }
62