Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.nio.channels.FileChannel;
- import java.nio.ByteBuffer;
- import java.nio.ByteOrder;
- import static java.nio.channels.FileChannel.MapMode.READ_ONLY;
- import static java.nio.ByteOrder.LITTLE_ENDIAN;
- ---
- FileChannel fileChannel = new FileInputStream("gaussian.dat").getChannel();
- fileChannel.map(READ_ONLY, 0, fileChannel.size()).order(LITTLE_ENDIAN).asDoubleBuffer().get(data);
- while (end < data.length) {
- pool.submit(new Partitioner(data, partitions, bucketCount, begin, end));
- begin += batchSize; end += batchSize;
- }
- pool.submit(new Partitioner(data, partitions, bucketCount,
- begin, data.length));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement