public final class CacheUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
createByteBuffer(int size)
Construct a direct, native-ordered and cache-line-aligned bytebuffer with the specified size.
|
static java.nio.CharBuffer |
createCharBuffer(int size)
Construct a direct, native-ordered and cache-line-aligned charbuffer with the specified number
of elements.
|
static java.nio.DoubleBuffer |
createDoubleBuffer(int size)
Construct a direct, native-ordered and cache-line-aligned doublebuffer with the specified number
of elements.
|
static java.nio.FloatBuffer |
createFloatBuffer(int size)
Construct a direct, native-ordered and cache-line-aligned floatbuffer with the specified number
of elements.
|
static java.nio.IntBuffer |
createIntBuffer(int size)
Construct a direct, native-ordered and cache-line-aligned intbuffer with the specified number
of elements.
|
static java.nio.LongBuffer |
createLongBuffer(int size)
Construct a direct, native-ordered and cache-line-aligned longbuffer with the specified number
of elements.
|
static PointerBuffer |
createPointerBuffer(int size)
Construct a cache-line-aligned PointerBuffer with the specified number
of elements.
|
static java.nio.ShortBuffer |
createShortBuffer(int size)
Construct a direct, native-ordered and cache-line-aligned shortbuffer with the specified number
of elements.
|
static int |
getCacheLineSize()
Returns the CPU cache line size, in number of bytes.
|
public static int getCacheLineSize()
public static java.nio.ByteBuffer createByteBuffer(int size)
size
- The size, in bytespublic static java.nio.ShortBuffer createShortBuffer(int size)
size
- The size, in shortspublic static java.nio.CharBuffer createCharBuffer(int size)
size
- The size, in charspublic static java.nio.IntBuffer createIntBuffer(int size)
size
- The size, in intspublic static java.nio.LongBuffer createLongBuffer(int size)
size
- The size, in longspublic static java.nio.FloatBuffer createFloatBuffer(int size)
size
- The size, in floatspublic static java.nio.DoubleBuffer createDoubleBuffer(int size)
size
- The size, in floatspublic static PointerBuffer createPointerBuffer(int size)
size
- The size, in memory addressesCopyright © 2002-2009 lwjgl.org. All Rights Reserved.