| 142 | kout[] sort[a,d] kin[] |
| 143 | */ |
| 144 | template <typename T> struct ArraySort : csnd::Plugin<1, 1> { |
| 145 | int process(csnd::myfltvec &out, csnd::myfltvec &in) { |
| 146 | std::copy(in.begin(), in.end(), out.begin()); |
| 147 | std::sort(out.begin(), out.end(), T()); |
| 148 | return OK; |
| 149 | } |
| 150 | |
| 151 | int init() { |
| 152 | csnd::myfltvec &out = outargs.myfltvec_data(0); |
| 153 | csnd::myfltvec &in = inargs.myfltvec_data(0); |
| 154 | out.init(csound, in.len()); |
| 155 | if (!is_perf()) process(out, in); |
| 156 | return OK; |
| 157 | } |
| 158 | |
| 159 | int kperf() { |
| 160 | return process(outargs.myfltvec_data(0), inargs.myfltvec_data(0)); |
| 161 | } |
| 162 | }; |
| 163 | |
| 164 | /** dot product |
| 165 | */ |
nothing calls this directly
no outgoing calls
no test coverage detected