Question about Conditional Stream Statements
Posted: Mon Sep 21, 2020 6:59 am
What's goodio y'all - been a minute. Hope everyone is riding out the storm.
few quick questions
I've been using what I believe is the most efficient implementation of conditional statements in dspcode..
I believe I picked it up on the forum a while ago.
which states
has been doing right by me, but is there a way to append more results in the "same line of code" and maintain this current structure/efficiency? like...
or something like...
or perhaps other variations... Would it increase efficiency by creating these types of logic statements I'm describing? or would it be the same as having multiple logic statements structure these conditions once it gets to assem? or would it be worse? is it "faster" or "saving cpu"
Also is the first example of conditional statement I posted real time, or a sample (or more) delay?
If it is real time, is this?
It sure would be nice if there were modules/hom files that were like the "stream math functions" for all of these conditional/logic style functions.. optimized much like the stream multiply etc...
or perhaps this is a great opportunity to create a logic/conditional database of efficient assem implementations(if it's not already in existence) of many of these sorts of things.....
If my memory serves correct, some post stated that the way of doing it in the manual is not that efficient or "optimized".. so unless I'm way off base, please don't push it back to the manual... I want the best way conceived of as of date...
Forgive any ignorance or presumptions
idiot savant << me << endl;
Peace.
~That Guy
few quick questions
I've been using what I believe is the most efficient implementation of conditional statements in dspcode..
I believe I picked it up on the forum a while ago.
- Code: Select all
y = b + (a - b)&(x == 2);
which states
- Code: Select all
if x = 2
then y = a
else y = b
has been doing right by me, but is there a way to append more results in the "same line of code" and maintain this current structure/efficiency? like...
- Code: Select all
if x = 2
then y = a
and
z = t
else
y = b
and
z = w
or something like...
- Code: Select all
if x = 2 or 3
then y = a
else y = b
or perhaps other variations... Would it increase efficiency by creating these types of logic statements I'm describing? or would it be the same as having multiple logic statements structure these conditions once it gets to assem? or would it be worse? is it "faster" or "saving cpu"
Also is the first example of conditional statement I posted real time, or a sample (or more) delay?
If it is real time, is this?
- Code: Select all
if x = y
then x = a
else x = x
It sure would be nice if there were modules/hom files that were like the "stream math functions" for all of these conditional/logic style functions.. optimized much like the stream multiply etc...
or perhaps this is a great opportunity to create a logic/conditional database of efficient assem implementations(if it's not already in existence) of many of these sorts of things.....
If my memory serves correct, some post stated that the way of doing it in the manual is not that efficient or "optimized".. so unless I'm way off base, please don't push it back to the manual... I want the best way conceived of as of date...
Forgive any ignorance or presumptions
idiot savant << me << endl;
Peace.
~That Guy