public final class UnsafeLongArrayAccess extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
LONG_ARRAY_BASE |
static int |
LONG_ELEMENT_SHIFT |
| Constructor and Description |
|---|
UnsafeLongArrayAccess() |
| Modifier and Type | Method and Description |
|---|---|
static long[] |
allocateLongArray(int capacity)
This makes for an easier time generating the atomic queues, and removes some warnings.
|
static long |
calcCircularLongElementOffset(long index,
long mask)
Note: circular arrays are assumed a power of 2 in length and the `mask` is (length - 1).
|
static long |
calcLongElementOffset(long index) |
static long |
lpLongElement(long[] buffer,
long offset)
A plain load (no ordering/fences) of an element from a given offset.
|
static long |
lvLongElement(long[] buffer,
long offset)
A volatile load of an element from a given offset.
|
static void |
soLongElement(long[] buffer,
long offset,
long e)
An ordered store of an element to a given offset
|
static void |
spLongElement(long[] buffer,
long offset,
long e)
A plain store (no ordering/fences) of an element to a given offset
|
public static final long LONG_ARRAY_BASE
public static final int LONG_ELEMENT_SHIFT
public static void spLongElement(long[] buffer,
long offset,
long e)
buffer - le bufferoffset - computed via calcLongElementOffset(long)e - an orderly kittypublic static void soLongElement(long[] buffer,
long offset,
long e)
buffer - le bufferoffset - computed via calcCircularLongElementOffset(long, long)e - an orderly kittypublic static long lpLongElement(long[] buffer,
long offset)
buffer - le bufferoffset - computed via calcLongElementOffset(long)public static long lvLongElement(long[] buffer,
long offset)
buffer - le bufferoffset - computed via calcCircularLongElementOffset(long, long)public static long calcLongElementOffset(long index)
index - desirable element indexpublic static long calcCircularLongElementOffset(long index,
long mask)
index - desirable element indexmask - (length - 1)public static long[] allocateLongArray(int capacity)
Copyright © 2013–2024. All rights reserved.