yes, I would expect that to happen at perf-time, because xout runs at i-time
but does not run at perf-time.
The other thing it does is indicate to the compiler the output variables that will
be passed out by copy or by reference to the caller.
So, with pass-by-copy (the original behaviour), any i-time code after xout will
not have any effect on the output, but perf-time code will be copied at the
end of the k-cycle, so the xout position does not matter. Incidentally, in this case, you
can only have one xout per UDO, more than one is a synterr.
Now, and this may yet change before the release, with pass-by-reference the position
of xout does not matter at i or perf-time (as long as it is placed after its arguments have
been defined) because all it does is connect the memory locations of inputs and outputs.
Multiple xouts seem to be allowed, the last one executed (at i-time) is the one
that makes the connection between the UDO and the outside.
yes, I would expect that to happen at perf-time, because xout runs at i-time
but does not run at perf-time.
The other thing it does is indicate to the compiler the output variables that will
be passed out by copy or by reference to the caller.
So, with pass-by-copy (the original behaviour), any i-time code after xout will
not have any effect on the output, but perf-time code will be copied at the
end of the k-cycle, so the xout position does not matter. Incidentally, in this case, you
can only have one xout per UDO, more than one is a synterr.
Now, and this may yet change before the release, with pass-by-reference the position
of xout does not matter at i or perf-time (as long as it is placed after its arguments have
been defined) because all it does is connect the memory locations of inputs and outputs.
Multiple xouts seem to be allowed, the last one executed (at i-time) is the one
that makes the connection between the UDO and the outside.
Prof. Victor Lazzarini
Maynooth University
Ireland
Warning
This email originated from outside of Maynooth University’s Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
Hello
Within a UDO, we can insert code after the xout, but it seems it will be processed before the xout.
For example
opcode MyTest, k, i
i1 xin
k1 init i1
k1 += 1
xout k1
k1 += 1
endop
If I run this like
k1 MyTest, 1
printk2 k1
… it will print 3,5,7,9,…
If the last line before endop is processed after the value has been sent out via xout, then I’d expect it to print 2,4,6,8,…
What am I missing?