MCPcopy Create free account
hub / github.com/csound/csound / ArraySort

Class ArraySort

Opcodes/arrayops.cpp:144–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 kout[] sort[a,d] kin[]
143 */
144template <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 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected