public async Task <double> Blas1([FromBody] VecVecMulClass input) { int id = input.Id; ActorId actorId = new ActorId(id); var actor = ActorProxy.Create <ILA>(actorId, new Uri("fabric:/Application/LAActorService")); string jsonInput = JsonConvert.SerializeObject(input); double output = await actor.VecVecMultiply(jsonInput); return(output); }
Task <double> ILA.VecVecMultiply(string jsonInput) { VecVecMulClass inputObject = JsonConvert.DeserializeObject <VecVecMulClass>(jsonInput); double[] vector1 = inputObject.Vector1; double[] vector2 = inputObject.Vector2; var n = vector1.Length; double product = 0; for (int i = 0; i < n; i++) { product = product + vector1[i] * vector2[i]; } return(Task.FromResult <double>(product)); }