rheolef  6.5
csr_to_asr.h
Go to the documentation of this file.
1 #ifndef _CSR_TO_ASR_H
2 #define _CSR_TO_ASR_H
3 
4 namespace rheolef {
47 template <
48  class InputPtrIterator,
49  class InputDataIterator,
50  class UnaryOperation,
51  class OutputPtrIterator>
52 OutputPtrIterator
54  InputPtrIterator iter_ptr_a,
55  InputPtrIterator last_ptr_a,
56  InputDataIterator iter_data_a,
57  UnaryOperation op,
58  OutputPtrIterator iter_ptr_b)
59 {
60  InputPtrIterator first_ptr_a = iter_ptr_a;
61  InputDataIterator first_data_a = iter_data_a;
62  InputPtrIterator next_ptr_a = iter_ptr_a;
63  next_ptr_a++;
64  while (next_ptr_a != last_ptr_a) {
65  InputDataIterator last_data_a = (*next_ptr_a);
66  while (iter_data_a != last_data_a) {
67  (*iter_ptr_b).insert(op(*iter_data_a));
68  iter_data_a++;
69  }
70  next_ptr_a++;
71  iter_ptr_b++;
72  }
73  return iter_ptr_b;
74 }
75 @endcode
76 } // namespace rheolef
77 #endif // _CSR_TO_ASR_H
78