vnl_fortran_copy_fixed.hxx
Go to the documentation of this file.
1 // This is core/vnl/vnl_fortran_copy_fixed.hxx
2 #ifndef vnl_fortran_copy_fixed_hxx_
3 #define vnl_fortran_copy_fixed_hxx_
4 //:
5 // \file
6 // \author Andrew W. Fitzgibbon, Oxford RRG
7 // \date 29 Aug 96
8 //-----------------------------------------------------------------------------
9 
10 #include "vnl_fortran_copy_fixed.h"
11 
12 //: Generate a fortran column-storage matrix from the given matrix.
13 template <class T, unsigned int R, unsigned int C>
15 {
16  T *d = data;
17  for (unsigned j = 0; j < C; ++j)
18  for (unsigned i = 0; i < R; ++i)
19  *d++ = M(i,j);
20 }
21 
22 
23 //--------------------------------------------------------------------------------
24 
25 #undef VNL_FORTRAN_COPY_FIXED_INSTANTIATE
26 #define VNL_FORTRAN_COPY_FIXED_INSTANTIATE(T , R , C ) template class VNL_EXPORT vnl_fortran_copy_fixed<T , R , C >
27 
28 #endif // vnl_fortran_copy_fixed_hxx_
Convert row-stored matrix to column-stored.
vnl_fortran_copy_fixed(vnl_matrix_fixed< T, R, C > const &M)
Generate a fortran column-storage matrix from the given matrix.