1
0
Fork 0

Ex2.5 feedback: Show how a multidimensional array is stored in-memory

This commit is contained in:
Eric Teunis de Boone 2020-06-30 11:29:50 +02:00
parent 415032e0ef
commit 95ddbf5bde

View file

@ -37,7 +37,6 @@ int main() {
double * nvec = multiply( ivec, Nx, mtx ); double * nvec = multiply( ivec, Nx, mtx );
@ -49,6 +48,17 @@ int main() {
} }
std::cout << "]" << std::endl; std::cout << "]" << std::endl;
delete nvec; delete nvec;
// print the matrix as it is stored in memory
std::cout << "In-Memory Matrix = ";
std::cout << "[" << std::endl;
for ( int i = 0; i < Nx*Y_SIZE; i++ ){
std::cout << mtx[0][i] << ", ";
}
std::cout << std::endl;
std::cout << "]" << std::endl;
} }