core/vnl/vnl_fortran_copy_fixed.txx
Go to the documentation of this file.
00001 // This is core/vnl/vnl_fortran_copy_fixed.txx
00002 #ifndef vnl_fortran_copy_fixed_txx_
00003 #define vnl_fortran_copy_fixed_txx_
00004 //:
00005 // \file
00006 // \author Andrew W. Fitzgibbon, Oxford RRG
00007 // \date   29 Aug 96
00008 //-----------------------------------------------------------------------------
00009 
00010 #include "vnl_fortran_copy_fixed.h"
00011 
00012 //: Generate a fortran column-storage matrix from the given matrix.
00013 template <class T, unsigned int R, unsigned int C>
00014 vnl_fortran_copy_fixed<T,R,C>::vnl_fortran_copy_fixed(vnl_matrix_fixed<T,R,C> const & M)
00015 {
00016   T *d = data;
00017   for (unsigned j = 0; j < C; ++j)
00018     for (unsigned i = 0; i < R; ++i)
00019       *d++ = M(i,j);
00020 }
00021 
00022 
00023 //--------------------------------------------------------------------------------
00024 
00025 #undef VNL_FORTRAN_COPY_FIXED_INSTANTIATE
00026 #define VNL_FORTRAN_COPY_FIXED_INSTANTIATE(T , R , C ) template class vnl_fortran_copy_fixed<T , R , C >
00027 
00028 #endif // vnl_fortran_copy_fixed_txx_