// -*- c++ -*- // // $COPYRIGHT$ // //=========================================================================== #include using namespace std; #include int main() { #ifdef MTL_DISABLE_BLOCKING cout << "Static blocking unsupported for this compiler" << endl; #else using namespace mtl; //begin const int M = 4; const int N = 4; typedef matrix, dense<>, column_major >::type Matrix; Matrix A(M,N); for (int i = 0; i < M; ++i) for (int j = 0; j < N; ++j) A(i, j) = i * N + j; print_all_matrix(A); block_view::type bA = blocked(A, blk<2,2>()); print_partitioned_matrix(bA); block_view::type cA = blocked(A, 2, 2); print_partitioned_by_column(cA); //end #endif return 0; }