public static double[][] benchmarkJLargeArraysDoubleSequentualNative(long[] sizes, int[] nthreads, int iters, String file)
    {
        LargeArray.setMaxSizeOf32bitArray(1);
        double[][] results = new double[nthreads.length][sizes.length];
        long k;
        System.out.println("Benchmarking JLargeArrays (doubles, sequentual, native)");
        for (int th = 0; th < nthreads.length; th++) {
            int nt = nthreads[th];
            Thread[] threads = new Thread[nt];
            System.out.println("\tNumber of threads = " + nt);
            for (int i = 0; i < sizes.length; i++) {
                System.out.print("\tSize = " + sizes[i]);
                final DoubleLargeArray a = new DoubleLargeArray(sizes[i]);
                double t = System.nanoTime();
                for (int it = 0; it < iters; it++) {
                    k = sizes[i] / nt;
                    for (int j = 0; j < nt; j++) {
                        final long firstIdx = j * k;
                        final long lastIdx = (j == nt - 1) ? sizes[i] : firstIdx + k;
                        threads[j] = new Thread(new Runnable()
                        {
                            @Override
                            public void run()
                            {
                                for (long k = firstIdx; k < lastIdx; k++) {
                                    a.setToNative(k, 1.);
                                    a.setToNative(k, (a.getFromNative(k) + 1.));
                                }
                            }
                        });
                        threads[j].start();
                    }
                    try {
                        for (int j = 0; j < nt; j++) {
                            threads[j].join();
                            threads[j] = null;
                        }
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                }
                results[th][i] = (System.nanoTime() - t) / 1000000000.0 / (double) iters;
                System.out.println(" : " + String.format("%.7f sec", results[th][i]));
            }
        }
        writeToFile(sizes, nthreads, results, file);
        return results;
    }