Package org.apache.flink.runtime.memorymanager

Examples of org.apache.flink.runtime.memorymanager.CheckedMemorySegment


  //                                  LONGs
  // --------------------------------------------------------------------------------------------
 
  private static final void testPutLongs(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timePutLongsChecked(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here


    System.out.println(String.format("Writing %d x %d longs to %d segment: checked=%,d nsecs,  direct=%,d nsecs, unsafe=%,d nsecs.", rounds, numValues, segmentArray.length, elapsedChecked, elapsedDirect, elapsedUnsafe));
  }
 
  private static final void testGetLongs(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timeGetLongsChecked(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

  //                                  LONG BIG ENDIAN
  // --------------------------------------------------------------------------------------------
 
  private static final void testPutLongsBigEndian(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timePutLongsCheckedBigEndian(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

    System.out.println(String.format("Writing %d x %d big endian longs to %d segment: checked=%,d nsecs,  direct=%,d nsecs, unsafe=%,d nsecs.", rounds, numValues, segmentArray.length, elapsedChecked, elapsedDirect, elapsedUnsafe));
  }
 
  private static final void testGetLongsBigEndian(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timeGetLongsCheckedBigEndian(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

  //                                  LONG LITTLE ENDIAN
  // --------------------------------------------------------------------------------------------
 
  private static final void testPutLongsLittleEndian(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timePutLongsCheckedLittleEndian(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

    System.out.println(String.format("Writing %d x %d little endian longs to %d segment: checked=%,d nsecs,  direct=%,d nsecs, unsafe=%,d nsecs.", rounds, numValues, segmentArray.length, elapsedChecked, elapsedDirect, elapsedUnsafe));
  }
 
  private static final void testGetLongsLittleEndian(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timeGetLongsCheckedLittleEndian(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

  //                                  INTs
  // --------------------------------------------------------------------------------------------
 
  private static final void testPutInts(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timePutIntsChecked(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

    System.out.println(String.format("Writing %d x %d ints to %d segment: checked=%,d nsecs,  direct=%,d nsecs, unsafe=%,d nsecs.", rounds, numValues, segmentArray.length, elapsedChecked, elapsedDirect, elapsedUnsafe));
  }
 
  private static final void testGetInts(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timeGetIntsChecked(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

  //                                  BYTEs
  // --------------------------------------------------------------------------------------------
 
  private static final void testPutBytes(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timePutBytesChecked(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

    System.out.println(String.format("Writing %d x %d bytes to %d segment: checked=%,d nsecs,  direct=%,d nsecs, unsafe=%,d nsecs.", rounds, numValues, segmentArray.length, elapsedChecked, elapsedDirect, elapsedUnsafe));
  }
 
  private static final void testGetBytes(byte[] segmentArray, int numValues, int rounds) {
    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timeGetBytesChecked(checkedSegment, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.memorymanager.CheckedMemorySegment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.