public static void performAggregateUnary(
      MatrixIndexes indexesIn,
      MatrixValue valueIn,
      MatrixIndexes indexesOut,
      MatrixValue valueOut,
      AggregateUnaryOperator op,
      int brlen,
      int bclen)
      throws DMLRuntimeException {
    // operate on the value indexes first
    op.indexFn.execute(indexesIn, indexesOut);

    // perform on the value
    valueIn.aggregateUnaryOperations(op, valueOut, brlen, bclen, indexesIn);
  }