コード例 #1
0
 public Computation FinishComputation()
 {
     var computation = Computation;
     Computation = null;
     Status = RunnerStatus.Idle;
     return computation;
 }
コード例 #2
0
 public void StartComputation(Computation computation)
 {
     Status = RunnerStatus.Running;
     Computation = computation;
     Computation.Worker = Id;
     Connector.StartComputation(computation);
 }
コード例 #3
0
ファイル: Controller.cs プロジェクト: AnObfuscator/Dispartior
 public void StartComputation(Computation computation)
 {
     lock (controllerLock)
     {
         currentComputation = computation;
         var dataSourceConfig = computation.DataSetDefinition;
         var partitioner = dataSource.GetDataPartitioner(dataSourceConfig);
         var partitions = partitioner.Partition(dataSourceConfig, computation.PartitionSize);
         foreach (var dataPartition in partitions)
         {
             var computationPartition = new Computation();
             computationPartition.Algorithm = computation.Algorithm;
             computationPartition.Parameters = computation.Parameters;
             computationPartition.DataSetDefinition = dataPartition;
             todo.Enqueue(computationPartition);
         }
         computationInProgress = true;
         Console.WriteLine("Computation started with {0} tasks.", todo.Count);
     }
 }
コード例 #4
0
 public void StartComputation(Computation computation)
 {
     Console.WriteLine("Calling start computation on node... " + computation.Serialize());
     serviceInterface.Post(computation, "/doComputation");
 }