1 #ifndef RHEO_MSG_FROM_CONTEXT_PATTERN_H
2 #define RHEO_MSG_FROM_CONTEXT_PATTERN_H
24 # include "rheolef/msg_util.h"
68 class OutputIterator1,
69 class OutputIterator2,
70 class OutputIterator3>
73 InputIterator1 msg_size,
74 InputIterator1 last_msg_size,
75 OutputIterator1 from_proc,
76 OutputIterator2 from_ptr,
77 OutputIterator3 proc2from_proc)
79 typedef typename std::iterator_traits<InputIterator1>::value_type Size;
83 (*from_ptr++) = ptr_val;
84 while (msg_size != last_msg_size) {
85 Size sz = (*msg_size++);
87 (*from_proc++) = iproc;
89 (*from_ptr++) = ptr_val;
90 (*proc2from_proc) = i;
99 #endif // RHEO_MSG_FROM_CONTEXT_PATTERN_H