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 and Description
    `LibTensorAgg()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `aggregateBinaryTensor(BasicTensorBlock in, BasicTensorBlock aggVal, AggregateOperator aop)` Core incremental tensor aggregate (ak+) as used for uack+ and acrk+.
    `static void` | `aggregateUnaryTensor(BasicTensorBlock in, BasicTensorBlock out, AggregateUnaryOperator uaop)` Aggregate a tensor-block with the given unary operator.
    `static boolean` | `isSupportedUnaryAggregateOperator(AggregateUnaryOperator op)` Determines whether the unary operator is supported.
    `static boolean` | `satisfiesMultiThreadingConstraints(BasicTensorBlock in, int k)` Check if a aggregation fulfills the constraints to be split to multiple threads.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LibTensorAgg

          public LibTensorAgg()

  - ### 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 aggregated
        `k` - 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 block
        `out` - the output tensor block containing the aggregated result
        `uaop` - 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 aggregation
        `aggVal` - 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

Copyright © 2020 The Apache Software Foundation. All rights reserved.