public static Render SelectRender(Action<int, int, int> draw, Func<bool> abort, bool useVectorTypes, bool doublePrecision, bool isMultiThreaded, bool useAbstractDataType, bool dontUseIntTypes = true) { if (useVectorTypes && doublePrecision) { if (dontUseIntTypes) { var r = new VectorDoubleStrictRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) return r.RenderMultiThreadedWithADT; else // !useAbstractDataType return r.RenderMultiThreadedNoADT; } else // !isMultiThreaded { if (useAbstractDataType) return r.RenderSingleThreadedWithADT; else // !useAbstractDataType return r.RenderSingleThreadedNoADT; } } else // !dontUseIntTypes { var r = new VectorDoubleRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) return r.RenderMultiThreadedWithADT; else // !useAbstractDataType return r.RenderMultiThreadedNoADT; } else // !isMultiThreaded { if (useAbstractDataType) return r.RenderSingleThreadedWithADT; else // !useAbstractDataType return r.RenderSingleThreadedNoADT; } } } else if (useVectorTypes && !doublePrecision) { if (dontUseIntTypes) { var r = new VectorFloatStrictRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) return r.RenderMultiThreadedWithADT; else // !useAbstractDataType return r.RenderMultiThreadedNoADT; } else // !isMultiThreaded { if (useAbstractDataType) return r.RenderSingleThreadedWithADT; else // !useAbstractDataType return r.RenderSingleThreadedNoADT; } } else // !dontUseIntTypes { var r = new VectorFloatRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) return r.RenderMultiThreadedWithADT; else // !useAbstractDataType return r.RenderMultiThreadedNoADT; } else // !isMultiThreaded { if (useAbstractDataType) return r.RenderSingleThreadedWithADT; else // !useAbstractDataType return r.RenderSingleThreadedNoADT; } } } else if (!useVectorTypes && doublePrecision) { var r = new ScalarDoubleRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) return r.RenderMultiThreadedWithADT; else // !useAbstractDataType return r.RenderMultiThreadedNoADT; } else // !isMultiThreaded { if (useAbstractDataType) return r.RenderSingleThreadedWithADT; else // !useAbstractDataType return r.RenderSingleThreadedNoADT; } } else // (!useVectorTypes && !doublePrecision) { var r = new ScalarFloatRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) return r.RenderMultiThreadedWithADT; else // !useAbstractDataType return r.RenderMultiThreadedNoADT; } else // !isMultiThreaded { if (useAbstractDataType) return r.RenderSingleThreadedWithADT; else // !useAbstractDataType return r.RenderSingleThreadedNoADT; } } }
public static Render SelectRender(Action <int, int, int> draw, Func <bool> abort, bool useVectorTypes, bool doublePrecision, bool isMultiThreaded, bool useAbstractDataType, bool dontUseIntTypes = true) { if (useVectorTypes && doublePrecision) { if (dontUseIntTypes) { var r = new VectorDoubleStrictRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) { return(r.RenderMultiThreadedWithADT); } else // !useAbstractDataType { return(r.RenderMultiThreadedNoADT); } } else // !isMultiThreaded { if (useAbstractDataType) { return(r.RenderSingleThreadedWithADT); } else // !useAbstractDataType { return(r.RenderSingleThreadedNoADT); } } } else // !dontUseIntTypes { var r = new VectorDoubleRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) { return(r.RenderMultiThreadedWithADT); } else // !useAbstractDataType { return(r.RenderMultiThreadedNoADT); } } else // !isMultiThreaded { if (useAbstractDataType) { return(r.RenderSingleThreadedWithADT); } else // !useAbstractDataType { return(r.RenderSingleThreadedNoADT); } } } } else if (useVectorTypes && !doublePrecision) { if (dontUseIntTypes) { var r = new VectorFloatStrictRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) { return(r.RenderMultiThreadedWithADT); } else // !useAbstractDataType { return(r.RenderMultiThreadedNoADT); } } else // !isMultiThreaded { if (useAbstractDataType) { return(r.RenderSingleThreadedWithADT); } else // !useAbstractDataType { return(r.RenderSingleThreadedNoADT); } } } else // !dontUseIntTypes { var r = new VectorFloatRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) { return(r.RenderMultiThreadedWithADT); } else // !useAbstractDataType { return(r.RenderMultiThreadedNoADT); } } else // !isMultiThreaded { if (useAbstractDataType) { return(r.RenderSingleThreadedWithADT); } else // !useAbstractDataType { return(r.RenderSingleThreadedNoADT); } } } } else if (!useVectorTypes && doublePrecision) { var r = new ScalarDoubleRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) { return(r.RenderMultiThreadedWithADT); } else // !useAbstractDataType { return(r.RenderMultiThreadedNoADT); } } else // !isMultiThreaded { if (useAbstractDataType) { return(r.RenderSingleThreadedWithADT); } else // !useAbstractDataType { return(r.RenderSingleThreadedNoADT); } } } else // (!useVectorTypes && !doublePrecision) { var r = new ScalarFloatRenderer(draw, abort); if (isMultiThreaded) { if (useAbstractDataType) { return(r.RenderMultiThreadedWithADT); } else // !useAbstractDataType { return(r.RenderMultiThreadedNoADT); } } else // !isMultiThreaded { if (useAbstractDataType) { return(r.RenderSingleThreadedWithADT); } else // !useAbstractDataType { return(r.RenderSingleThreadedNoADT); } } } }