Search in sources :

Example 1 with DistributedVectorMessage

use of org.nd4j.parameterserver.distributed.messages.intercom.DistributedVectorMessage in project nd4j by deeplearning4j.

the class VectorRequestMessage method processMessage.

/**
 * This message is possible to get only as Shard
 */
@Override
public void processMessage() {
    VectorAggregation aggregation = new VectorAggregation(rowIndex, (short) voidConfiguration.getNumberOfShards(), getShardIndex(), storage.getArray(key).getRow(rowIndex).dup());
    aggregation.setOriginatorId(this.getOriginatorId());
    clipboard.pin(aggregation);
    DistributedVectorMessage dvm = new DistributedVectorMessage(key, rowIndex);
    dvm.setOriginatorId(this.originatorId);
    if (voidConfiguration.getNumberOfShards() > 1)
        transport.sendMessageToAllShards(dvm);
    else {
        aggregation.extractContext(this);
        aggregation.processMessage();
    }
}
Also used : DistributedVectorMessage(org.nd4j.parameterserver.distributed.messages.intercom.DistributedVectorMessage) VectorAggregation(org.nd4j.parameterserver.distributed.messages.aggregations.VectorAggregation)

Aggregations

VectorAggregation (org.nd4j.parameterserver.distributed.messages.aggregations.VectorAggregation)1 DistributedVectorMessage (org.nd4j.parameterserver.distributed.messages.intercom.DistributedVectorMessage)1