synaps/base/create_iterator.h

00001 #ifndef SYNAPS_UTIL_CREATE_ITERATOR_H
00002 #define SYNAPS_UTIL_CREATE_ITERATOR_H
00003 
00004 #include <synaps/init.h>
00005 
00006 __BEGIN_NAMESPACE_SYNAPS
00007 
00008 //----------------------------------------------------------------------
00009 template<class C> inline
00010 C* create(C* ptr, C* tab, unsigned int n)
00011 {
00012   return tab+n;
00013 }
00014 //----------------------------------------------------------------------
00015 template<class C, class T_ptr, class T_stride, class T_ref> class stride_iterator;
00016 
00017 template<class C, class T_ptr, class T_stride, class T_ref> inline
00018 stride_iterator<C,T_ptr,T_stride,T_ref>
00019   create(stride_iterator<C,T_ptr,T_stride,T_ref> it,C* tab, unsigned int n)
00020 {
00021   return stride_iterator<C,T_ptr,T_stride,T_ref>(tab+n,1);
00022 }
00023 //----------------------------------------------------------------------
00024 
00025 __END_NAMESPACE_SYNAPS
00026 
00027 #endif // SYNAPS_UTIL_CREATE_ITERATOR_H
00028 

SYNAPS DOCUMENTATION
logo