Search in sources :

Example 1 with CompLongLongRowUpdateSplit

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

the class CompLongLongVectorSplitter method split.

@Override
public Map<PartitionKey, RowUpdateSplit> split(Vector vector, List<PartitionKey> parts) {
    LongLongVector[] vecParts = ((CompLongLongVector) 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 CompLongLongRowUpdateSplit(vector.getRowId(), vecParts[i]));
    }
    return updateSplitMap;
}
Also used : CompLongLongVector(com.tencent.angel.ml.math2.vector.CompLongLongVector) HashMap(java.util.HashMap) LongLongVector(com.tencent.angel.ml.math2.vector.LongLongVector) CompLongLongVector(com.tencent.angel.ml.math2.vector.CompLongLongVector) CompLongLongRowUpdateSplit(com.tencent.angel.psagent.matrix.oplog.cache.CompLongLongRowUpdateSplit) PartitionKey(com.tencent.angel.PartitionKey) RowUpdateSplit(com.tencent.angel.psagent.matrix.oplog.cache.RowUpdateSplit) CompLongLongRowUpdateSplit(com.tencent.angel.psagent.matrix.oplog.cache.CompLongLongRowUpdateSplit)

Aggregations

PartitionKey (com.tencent.angel.PartitionKey)1 CompLongLongVector (com.tencent.angel.ml.math2.vector.CompLongLongVector)1 LongLongVector (com.tencent.angel.ml.math2.vector.LongLongVector)1 CompLongLongRowUpdateSplit (com.tencent.angel.psagent.matrix.oplog.cache.CompLongLongRowUpdateSplit)1 RowUpdateSplit (com.tencent.angel.psagent.matrix.oplog.cache.RowUpdateSplit)1 HashMap (java.util.HashMap)1