Examples of CheckedMemorySegment


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

  //                                  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

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

    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

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

    for (int i = 0; i < sourceArray.length; i++) {
      sourceArray[i] = (byte) (i % Byte.MAX_VALUE);
    }

    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timePutByteArrayChecked(checkedSegment, sourceArray, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here

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

 
  private static final void testGetByteArrays1024(byte[] segmentArray, int numValues, int rounds) {
    byte[] targetArray = new byte[1024];

    Arrays.fill(segmentArray, (byte) 0);
    CheckedMemorySegment checkedSegment = new CheckedMemorySegment(segmentArray);
    long elapsedChecked = timeGetByteArrayChecked(checkedSegment, targetArray, numValues, rounds);
    checkedSegment = null;
   
    Arrays.fill(segmentArray, (byte) 0);
    SimpleMemorySegment directSegment = new SimpleMemorySegment(segmentArray);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.