- fix for initializing vector and matrix object memory to 0
- updated the testing code
signed-off-by: Ramasamy <ram.kannan@samsung.com>
Change-Id: I9417c85f7e5ff56e592772afee7b1e6f4fc1abe2
m_mat = new TYPE *[m_rows];
for (int i = 0; i < m_rows; i++)
- m_mat[i] = new TYPE [m_cols];
+ m_mat[i] = new TYPE [m_cols]();
}
template <typename TYPE>
matrix<float> m21(3, 1, (float *) arr12);
matrix<float> m22(2, 3, (float *) arr15);
- cout<<"Addition\n";
+ cout<< "Constructor Test\n";
+ cout<< "\n" << m6;
+
+ cout<<"\n\nAddition\n";
m6 = m10 + m15;
m13 = m11 + m11;
cout<< "\n" << m10 <<"\n"<< m15;
float arr67[3][1] = {{2.0}, {3.0}, {4.0}};
matrix<float> m32(3, 1, (float *) arr67);
- cout<< "Addition\n";
+ cout<< "Constructor Test\n";
+ cout<< "\n" << v3;
+
+ cout<< "\n\nAddition\n";
v3 = v21 + v22;
v95 = v15 + v20;
cout<< "\n" << v21 << "\n" << v22;
{
m_size = size;
m_vec = NULL;
- m_vec = new TYPE [m_size];
+ m_vec = new TYPE [m_size]();
}
template <typename TYPE>