Package org.apache.sysds.runtime.data
Class LibTensorAgg
java.lang.Object
org.apache.sysds.runtime.data.LibTensorAgg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaggregateBinaryTensor(BasicTensorBlock in, BasicTensorBlock aggVal, AggregateOperator aop) Core incremental tensor aggregate (ak+) as used for uack+ and acrk+.static voidAggregate a tensor-block with the given unary operator.static booleanDetermines whether the unary operator is supported.static booleanCheck if a aggregation fulfills the constraints to be split to multiple threads.
-
Constructor Details
-
LibTensorAgg
public LibTensorAgg()
-
-
Method Details
-
satisfiesMultiThreadingConstraints
Check if a aggregation fulfills the constraints to be split to multiple threads.- Parameters:
in- the tensor block to be aggregatedk- the number of threads- Returns:
- true if aggregation should be done on multiple threads, false otherwise
-
aggregateUnaryTensor
public static void aggregateUnaryTensor(BasicTensorBlock in, BasicTensorBlock out, AggregateUnaryOperator uaop) Aggregate a tensor-block with the given unary operator.- Parameters:
in- the input tensor blockout- the output tensor block containing the aggregated resultuaop- the unary operation to apply
-
aggregateBinaryTensor
public static void aggregateBinaryTensor(BasicTensorBlock in, BasicTensorBlock aggVal, AggregateOperator aop) Core incremental tensor aggregate (ak+) as used for uack+ and acrk+. Embedded correction values.- Parameters:
in- partial aggregationaggVal- partial aggregation, also output (in will be added to this)aop- aggregation operator
-
isSupportedUnaryAggregateOperator
Determines whether the unary operator is supported.- Parameters:
op- the unary operator to check- Returns:
- true if the operator is supported, false otherwise
-