Search in sources :

Example 1 with CompLongDoubleRowUpdateSplit

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

the class CompLongDoubleVectorSplitter method split.

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

Aggregations

PartitionKey (com.tencent.angel.PartitionKey)1 CompLongDoubleVector (com.tencent.angel.ml.math2.vector.CompLongDoubleVector)1 LongDoubleVector (com.tencent.angel.ml.math2.vector.LongDoubleVector)1 CompLongDoubleRowUpdateSplit (com.tencent.angel.psagent.matrix.oplog.cache.CompLongDoubleRowUpdateSplit)1 RowUpdateSplit (com.tencent.angel.psagent.matrix.oplog.cache.RowUpdateSplit)1 HashMap (java.util.HashMap)1