code: @Override
      public void aggregate(Aggregate op, long key) {
          int deviceId = Nd4j.getAffinityManager().getDeviceForCurrentThread();
          if (opCounter.get() == null)
              opCounter.set(new AtomicLong(0));
  
          // we enqueue op for specific device here
          aggregates.get(deviceId).add(new AggregateDescriptor(op, key, opCounter.get().getAndIncrement()));
      }
docs: This method enqueues aggregate op for future invocation.
  Key value will be used to batch individual ops
  
  @param op
  @param key