block_view<Matrix, int BM = 0, int BN = 0> [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:containers,generators Component type:type
Description
 block_view bA = blocked<>(A, 16, 16);
 or
 block_view bA = blocked(A);
 
Note: currently not supported for egcs (internal compiler error).
Example
In blocked_matrix.cc:
  const int M = 4;
  const int N = 4;
  typedef matrix<double,
                 rectangle<>, 
                 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<Matrix,2,2>::type
                     bA = blocked(A, blk<2,2>());
  print_partitioned_matrix(bA);

  block_view<Matrix>::type cA = blocked(A, 2, 2);
  print_partitioned_by_column(cA);

Definition
matrix.h
Template Parameters

ParameterDescriptionDefault
MatrixThe type of the Matrix to be blocked, must be dense 
BMThe blocking factor for the rows (M dimension) 0 for dynamic size
BNThe blocking factor for the columns (N dimension) 0 for dynamic size
Model of
Members
Member Where defined Description
type   The generated type
New members
Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.