This method accepts updates suitable for StepFunction and puts them to the queue, which is used in backpropagation loop
<p>
PLEASE NOTE: array is expected to be ready for use and match params dimensionality

@param array
162846
@Override
    public void receiveUpdate(INDArray array) {
        try {
            // we're replicating COMPRESSED MESSAGES, decompression will be thread-local
            for (int i = 0; i < parties; i++) {
                // we don't want to have same workspace to be accessible by 2 different threads for now
                /*
                    With synchronized external data, it's impossible to deadlock here.
                    Each worker is guaranteed to have at least NUM_WORKERS slots in buffer.
                    So we use this lock just to ensure thread-safety of corresponding workspaces
                */
                locks.get(i).lock();

                try (MemoryWorkspace workspace = workspaces.get(i).notifyScopeEntered()) {
                    // we might just scope out of workspace here, instead of throwing error out
                    if (array.data().length() > (initialMemory / queueSize)
                                    / Nd4j.sizeOfDataType(array.data().dataType()))
                        throw new ND4JIllegalStateException("Not enough memory to handle update: ["
                                        + array.data().length() * Nd4j.sizeOfDataType(array.data().dataType())
                                        + " bytes required]. Please increase memory amount for GradientsAccumulator");

                    INDArray compressed = array.unsafeDuplication();
                    try {
                        messages.get(i).put(compressed);
                    } catch (InterruptedException e) {
                        Thread.currentThread().interrupt();
                        log.warn("Something bad at index_{}", i);
                        throw new RuntimeException(e);
                    }
                }

                locks.get(i).unlock();
            }
        } catch (Exception e) {
            throwable.setIfFirst(e);
            throw new RuntimeException(e);
        }
    }
1166576
public static <E extends Comparable<E>> void sort(E[] array) {
        while(!Sort.isSorted(array)) {
            FYShuffle.shuffle(array);
        }
    }
709597
@Override
    public void receiveUpdate(INDArray array) {
        extCounter.getAndIncrement();

        updatesLock.writeLock().lock();

        if (updates == null) {
            try (MemoryWorkspace workspace = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
                // TODO: this one has to be HOST-only if P2P is NOT supported
                updates = Nd4j.create(array.shape(), array.ordering());
            }
        }

        hasSomething.compareAndSet(false, true);

        // if P2P is NOT supported - this call should be handled with cpu
        updates.addi(array);

        // we have to ensure, all operations were finished here
        Nd4j.getExecutioner().commit();

        updatesLock.writeLock().unlock();
    }
757926
public static <E extends Comparable<E>> void sortDescending(E[] array) {
        while(!Sort.isReverseSorted(array)) {
            FYShuffle.shuffle(array);
        }
    }
782893
@Override
    public void synchronizeHostData(INDArray array) {
        if (array.isEmpty() || array.isS())
            return;

        val buffer = array.data().originalDataBuffer() == null ? array.data() : array.data().originalDataBuffer();
        synchronizeHostData(buffer);
    }
56549
public void add(int numberOfParagraph, int startOfSentencePosition, int nextSentencePosition, SingleProofreadingError[] errorArray) {
    entries.add(new CacheEntry(numberOfParagraph, startOfSentencePosition, nextSentencePosition, errorArray));
  }
108416
function (params) {
            if (! this.active) {
                return;
            }

            var paramsArr = Array.prototype.slice.call(arguments),
                n = this._bindings.length,
                bindings;

            if (this.memorize) {
                this._prevParams = paramsArr;
            }

            if (! n) {
                //should come after memorize
                return;
            }

            bindings = this._bindings.slice(); //clone array in case add/remove items during dispatch
            this._shouldPropagate = true; //in case `halt` was called before dispatch or during the previous dispatch.

            //execute all callbacks until end of the list or until a callback returns `false` or stops propagation
            //reverse loop since listeners with higher priority will be added at the end of the list
            do { n--; } while (bindings[n] && this._shouldPropagate && bindings[n].execute(paramsArr) !== false);
        }
660861
function pushArrayCache (parser, array, pos) {
  parser.arrayCache.push(array)
  parser.arrayPos.push(pos)
}
1001426
@Override
    public void setArray(int parameterIndex, Array x) throws SQLException {
        internalStmt.setArray(parameterIndex, x);
    }
1294023
@Override
	public void updateArray(final int columnIndex, final Array x) throws SQLException {
		wrapped.updateArray(columnIndex, x);
	}
1073464
public static void sortArray(int[] array) {

        boolean swapped;

        do {
            swapped = false;

            for (int i = 0; i < array.length - 1; i++) {
                if (array[i] > array[i + 1]) {
                    int temp = array[i + 1];

                    array[i + 1] = array[i];
                    array[i]     = temp;
                    swapped      = true;
                }
            }
        } while (swapped);
    }
1067288
private static int [] growArray(int[] array, float growFactor) {
        int currentSize = array.length;
        int newArray[] = new int[(int)(currentSize * growFactor)];
        System.arraycopy(array, 0, newArray, 0, currentSize);
        return newArray;
    }
998960
@SuppressWarnings("unchecked")
  public T[] pollToArray(T[] array) {
    int currentIndex = 0;
    LinkedElement<T> current = null;

    if (array.length == 0) {
      return array;
    }
    if (array.length > size) {
      array = (T[]) java.lang.reflect.Array.newInstance(array.getClass()
          .getComponentType(), size);
    }
    // do fast polling if the entire set needs to be fetched
    if (array.length == size) {
      for (int i = 0; i < entries.length; i++) {
        current = entries[i];
        while (current != null) {
          array[currentIndex++] = current.element;
          current = current.next;
        }
      }
      this.clear();
      return array;
    }

    boolean done = false;
    int currentBucketIndex = 0;

    while (!done) {
      current = entries[currentBucketIndex];
      while (current != null) {
        array[currentIndex++] = current.element;
        current = current.next;
        entries[currentBucketIndex] = current;
        size--;
        modification++;
        if (currentIndex == array.length) {
          done = true;
          break;
        }
      }
      currentBucketIndex++;
    }
    shrinkIfNecessary();
    return array;
  }
1122643
function() {
        var queue = this._queue;
        for (var i = 0, len = queue.length; i < len; ++i) {
            this[queue[i][0]].apply(this, queue[i][1]);
        }
    }
1166656
@Override
    public void addUpdate(NDArrayMessage array) {
        UnsafeBuffer directBuffer = (UnsafeBuffer) NDArrayMessage.toBuffer(array);
        byte[] data = directBuffer.byteArray();
        if (data == null) {
            data = new byte[directBuffer.capacity()];
            directBuffer.getBytes(0, data, 0, data.length);
        }
        byte[] key = ByteBuffer.allocate(4).putInt(size).array();
        try {
            db.put(key, data);
        } catch (RocksDBException e) {
            throw new RuntimeException(e);
        }

        size++;

    }
1258867
public void setSteps(java.util.Collection<Step> steps) {
        if (steps == null) {
            this.steps = null;
            return;
        }

        this.steps = new java.util.ArrayList<Step>(steps);
    }
1263571
private void update() {
        if (!predefinedPriori) {
            for (int c = 0; c < k; c++) {
                priori[c] = (nc[c] + EPSILON) / (n + k * EPSILON);
            }
        }

        if (model == Model.MULTINOMIAL || model == Model.POLYAURN) {
            for (int c = 0; c < k; c++) {
                for (int t = 0; t < p; t++) {
                    condprob[c][t] = (ntc[c][t] + sigma) / (nt[c] + sigma * p);
                }
            }
        } else {
            for (int c = 0; c < k; c++) {
                for (int t = 0; t < p; t++) {
                    condprob[c][t] = (ntc[c][t] + sigma) / (nc[c] + sigma * 2);
                }
            }
        }
    }