Search in sources :

Example 1 with CompLongFloatRowUpdateSplit

use of com.tencent.angel.psagent.matrix.oplog.cache.CompLongFloatRowUpdateSplit in project angel by Tencent.

the class CompLongFloatVectorSplitter method split.

@Override
public Map<PartitionKey, RowUpdateSplit> split(Vector vector, List<PartitionKey> parts) {
    LongFloatVector[] vecParts = ((CompLongFloatVector) vector).getPartitions();
    assert vecParts.length == parts.size();
    Map<PartitionKey, RowUpdateSplit> updateSplitMap = new HashMap<>(parts.size());
    for (int i = 0; i < vecParts.length; i++) {
        updateSplitMap.put(parts.get(i), new CompLongFloatRowUpdateSplit(vector.getRowId(), vecParts[i]));
    }
    return updateSplitMap;
}
Also used : CompLongFloatVector(com.tencent.angel.ml.math2.vector.CompLongFloatVector) HashMap(java.util.HashMap) PartitionKey(com.tencent.angel.PartitionKey) RowUpdateSplit(com.tencent.angel.psagent.matrix.oplog.cache.RowUpdateSplit) CompLongFloatRowUpdateSplit(com.tencent.angel.psagent.matrix.oplog.cache.CompLongFloatRowUpdateSplit) CompLongFloatVector(com.tencent.angel.ml.math2.vector.CompLongFloatVector) LongFloatVector(com.tencent.angel.ml.math2.vector.LongFloatVector) CompLongFloatRowUpdateSplit(com.tencent.angel.psagent.matrix.oplog.cache.CompLongFloatRowUpdateSplit)

Aggregations

PartitionKey (com.tencent.angel.PartitionKey)1 CompLongFloatVector (com.tencent.angel.ml.math2.vector.CompLongFloatVector)1 LongFloatVector (com.tencent.angel.ml.math2.vector.LongFloatVector)1 CompLongFloatRowUpdateSplit (com.tencent.angel.psagent.matrix.oplog.cache.CompLongFloatRowUpdateSplit)1 RowUpdateSplit (com.tencent.angel.psagent.matrix.oplog.cache.RowUpdateSplit)1 HashMap (java.util.HashMap)1