Package org.apache.sysds.runtime.data
Class LibTensorAgg
- java.lang.Object
-
- org.apache.sysds.runtime.data.LibTensorAgg
-
public class LibTensorAgg extends Object
-
-
Constructor Summary
Constructors Constructor Description LibTensorAgg()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaggregateBinaryTensor(BasicTensorBlock in, BasicTensorBlock aggVal, AggregateOperator aop)Core incremental tensor aggregate (ak+) as used for uack+ and acrk+.static voidaggregateUnaryTensor(BasicTensorBlock in, BasicTensorBlock out, AggregateUnaryOperator uaop)Aggregate a tensor-block with the given unary operator.static booleanisSupportedUnaryAggregateOperator(AggregateUnaryOperator op)Determines whether the unary operator is supported.static booleansatisfiesMultiThreadingConstraints(BasicTensorBlock in, int k)Check if a aggregation fulfills the constraints to be split to multiple threads.
-
-
-
Method Detail
-
satisfiesMultiThreadingConstraints
public static boolean satisfiesMultiThreadingConstraints(BasicTensorBlock in, int k)
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
public static boolean isSupportedUnaryAggregateOperator(AggregateUnaryOperator op)
Determines whether the unary operator is supported.- Parameters:
op- the unary operator to check- Returns:
- true if the operator is supported, false otherwise
-
-