public final class CacheUtil extends Object
Modifier and Type | Method | Description |
---|---|---|
static ByteBuffer |
createByteBuffer(int size) |
Construct a direct, native-ordered and cache-line-aligned bytebuffer with the specified size.
|
static CharBuffer |
createCharBuffer(int size) |
Construct a direct, native-ordered and cache-line-aligned charbuffer with the specified number
of elements.
|
static DoubleBuffer |
createDoubleBuffer(int size) |
Construct a direct, native-ordered and cache-line-aligned doublebuffer with the specified number
of elements.
|
static FloatBuffer |
createFloatBuffer(int size) |
Construct a direct, native-ordered and cache-line-aligned floatbuffer with the specified number
of elements.
|
static IntBuffer |
createIntBuffer(int size) |
Construct a direct, native-ordered and cache-line-aligned intbuffer with the specified number
of elements.
|
static 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 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 ByteBuffer createByteBuffer(int size)
size
- The size, in bytespublic static ShortBuffer createShortBuffer(int size)
size
- The size, in shortspublic static CharBuffer createCharBuffer(int size)
size
- The size, in charspublic static IntBuffer createIntBuffer(int size)
size
- The size, in intspublic static LongBuffer createLongBuffer(int size)
size
- The size, in longspublic static FloatBuffer createFloatBuffer(int size)
size
- The size, in floatspublic static 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.