public static void Clear() { MemoryCoordinator.Reset(); GpfProgramCompiler.Clear(); Protocols.Clear(); Kernels.Clear(); head = null; }
public static void GenerateProgram() { Kernels.BuildKernelProgram(); //connect all protocols to one another - builds dependant and dependency lists head.Connect(); //remove all protocols which do not connect the root to any of the target fields var list = Protocols.Values.Where(protocol => protocol.Required(Kernels.Targets.ReleventFields, head)).ToList(); //remaining protocols are those required to process the supplied targets list.Sort(); //trim redundant refs from the remaining protocols and connect switch to switch field var k = 1; //root is 1 -> 0 is none foreach (var p in list) { p.RemoveRedundancies(Kernels.Targets, list); p.Identifier = k++; } GpfProgramCompiler.Compile(list); }