}); setJoiner(NULL()); } } }); }
}); }
  public void init()  {    // how many streams per hierarchical splitjoin in the detect phase    final int GENERATE_BLOCKING     = 1;     // how many streams per hierarchical splitjoin in the detect phase    final int DETECT_BLOCKING       = 2;    final int numChannels           = 12;//48;    final int numSamples            = 64;//4096;    final int numBeams              = 4;//16;    final int numCoarseFilterTaps   = 64;//    final int numFineFilterTaps     = 64;//    final int coarseDecimationRatio = 1;    final int fineDecimationRatio   = 2;    final int numSegments           = 1;    final int numPostDec1           = numSamples/coarseDecimationRatio;    final int numPostDec2           = numPostDec1/fineDecimationRatio;    final int mfSize                = numSegments*numPostDec2;    final int pulseSize             = numPostDec2/2;    final int predecPulseSize       = pulseSize*      coarseDecimationRatio*fineDecimationRatio;    final int targetBeam            = numBeams/4;    final int targetSample          = numSamples/4;    // targetSamplePostDec used to have a 1 added to it, but that    // seemed to do the wrong thing --bft    final int targetSamplePostDec   = targetSample/coarseDecimationRatio/fineDecimationRatio;    final float dOverLambda         = 0.5f;    final float cfarThreshold       = 0.95f * dOverLambda*numChannels       * (0.5f*pulseSize);    add(new SplitJoin() {	public void init() {	  int i;	  setSplitter(NULL());	  for(i=0; i<numChannels; i+=GENERATE_BLOCKING) {	    //this was within a pipeline; i don't think	    //it needed to be.  - cll	    add(new SplitJoin(i) {		SplitJoin(int i) {super(i); }		public void init(int i) {		  setSplitter(NULL());		  for (int k=0; k<GENERATE_BLOCKING; k++) {		    add(new Pipeline(i+k) {			Pipeline(int i) {super(i);}			public void init(int i) {			  add(new InputGenerate(i,						numSamples,						targetBeam,						targetSample,						cfarThreshold));			  add(new BeamFirFilter(numCoarseFilterTaps,						numSamples,						coarseDecimationRatio));			  add(new BeamFirFilter(numFineFilterTaps,						numPostDec1,						fineDecimationRatio));			}		      });		  }		  setJoiner(ROUND_ROBIN(2));		}	      });	  }	  setJoiner(ROUND_ROBIN(2*GENERATE_BLOCKING));	}      });    add(new SplitJoin() {	public void init() {	  int i;	  setSplitter(DUPLICATE());	  for(i=0; i<numBeams; i+=DETECT_BLOCKING) {	    add(new SplitJoin(i) {		public SplitJoin(int i) { super(i); }		public void init(int i) {		  setSplitter(DUPLICATE());		  for (int k=0; k<DETECT_BLOCKING; k++) {		    add (new Pipeline(i+k) {			public Pipeline(int i) { super(i); }			public void init(int i) {			  add(new Beamform(i, 					   numChannels));			  // Need to replace this fir with 			  //fft -> elWiseMult -> ifft			  add(new  BeamFirFilter(mfSize, 						 numPostDec2,						 1));			  add(new Magnitude());			  // with a more sophisticated detector, we need			  // someplace to store the data until we can find			  // the targets...			  add(new Detector(i,					   numPostDec2,					   targetBeam,					   targetSamplePostDec,					   cfarThreshold));			}		      });		  }		  setJoiner(NULL());		}	      });	    setJoiner(NULL());	  }	}      });  }