Skip to content

Instantly share code, notes, and snippets.

@eventhelix
Created March 10, 2015 02:10
Show Gist options
  • Save eventhelix/c0b7a97eb229b9090696 to your computer and use it in GitHub Desktop.
Save eventhelix/c0b7a97eb229b9090696 to your computer and use it in GitHub Desktop.
SignalProcessingCard class eliminates two dimensional array http://www.eventhelix.com/realtimemantra/object_oriented/object_design_tips_2.htm
// The two dimensional array is replaced. We identify
// SignalProcesingCard as an object. This
// object contains 32 DSPs
class SignalProcessingCard
{
DSP m_dsp[MAX_DSPS_PER_CARD];
public:
. . .
};
// Array of signal processing card objects, indexed by signal processing card id
SignalProcessingCard m_signalProcessingCard[MAX_SIGNAL_PROCESSOR_CARDS];
. . .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment