function computeOptimalWindowSize(inSize) {
    if (inSize <= PARALLELIZE_THRESHOLD) return inSize;
    return (0, _util.nearestDivisor)(inSize, Math.floor(Math.sqrt(inSize)));
}
Inputs of size above this threshold will be parallelized by calling multiple
shader programs.