public class RawMemoryFactory extends Object
register(RawMemoryRegionFactory)
methods. An application developer can use this method to add support
for additional memory regions.
Each create method returns an object of the corresponding type,
e.g., the createRawByte(RawMemoryRegion, long, int, int)
method returns a reference to an object that implements the
RawByte
interface and supports access to the
requested type of memory and address range. Each create method
is permitted to optimize error checking and access based on the
requested memory type and address range.
The usage pattern for raw memory, assuming the necessary factory has been registered, is illustrated by this example.
// Get an accessor object that can access memory starting at // baseAddress, for size bytes. RawInt memory = RawMemoryFactory.getDefaultFactory(). createRawInt(RawMemoryFactory.MEMORY_MAPPED_REGION, address, count, stride, false); // Use the accessor to load from and store to raw memory. int loadedData = memory.getInt(someOffset); memory.setInt(otherOffset, intVal);
When an application needs to access a class of memory that is not
already supported by a registered factory, the developer must implement
and register a factory that implements the RawMemoryRegionFactory
)
which can create objects to access memory in that region.
A raw memory region factory is identified by a
RawMemoryRegion
that is used by each create method,
e.g., createRawByte(RawMemoryRegion, long, int, int)
, to locate
the appropriate factory. The name is
provided to register(RawMemoryRegionFactory)
through
the factory's RawMemoryRegionFactory.getName()
method.
The register(RawMemoryRegionFactory)
method is only
used by the application code when it needs to add support for a new
type of raw memory.
Whether a given offset
addresses a high-order or low-order
byte of an aligned short
in memory is determined by the value
of the RealtimeSystem.BYTE_ORDER
static byte variable
in class RealtimeSystem
, by the start address of the
object, and by the offset
given the stride
of the
object. Regardless of the byte ordering, accessor methods
continue to select bytes starting at offset
from the
base address and continuing toward greater addresses.
A raw memory region cannot contain references to Java objects. Such a capability would be unsafe (since it could be used to defeat Java's type checking) and error prone (since it is sensitive to the specific representational choices made by the Java compiler).
Atomic loads and stores on raw memory are defined in terms of physical memory. This memory may be accessible to threads outside the JVM and to non-programmed access (e.g., DMA). Consequently, atomic access must be supported by hardware. This specification is written with the assumption that all suitable hardware platforms support atomic loads from raw memory for aligned bytes, shorts, and ints. Atomic access beyond the specified minimum may be supported by the implementation.
Storing values into raw memory is more hardware dependent than loading values. Many processor architectures do not support atomic stores of variables except for aligned stores of the processor's word size. For instance, storing a byte into memory might require reading a 32-bit quantity into a processor register, updating the register to reflect the new byte value, then restoring the whole 32-bit quantity. Changes to other bytes in the 32-bit quantity that take place between the load and the store are lost.
Some processors have mechanisms that can be used to implement an atomic store of a byte, but those mechanisms are often slow and not universally supported.
This class need not support unaligned access to data; but if it does, it is not required of the implementation to make such access atomic. Accesses to data aligned on its natural boundary will be atomic if the processor implements atomic loads and stores of that data size.
Except where noted, accesses to raw memory are not atomic with respect to the memory or with respect to tasks. A raw memory region could be updated by another task, or even unmapped in the middle of an access method, or even removed mid method.
The characteristics of raw-memory access are necessarily platform dependent. This specification provides a minimum requirement for the RTSJ platform, but it also supports optional system properties that identify a platform's level of support for atomic raw put and get. The properties can be represented by a four-dimensional sparse array of access type, data type, alignment, and atomicity with boolean values indicating whether that combination of access attributes is atomic. The default value for array entries is false. The array is described in the following table.
Attribute |
Values |
Comment |
Access type | read, write | |
Data type | byte, short, int, long, float, double | |
Alignment | 0 | aligned |
1 to one less than data type size | the first byte of the data is the value of alignment bytes away from natural alignment. | |
Atomicity | processor | means access is atomic with respect to other tasks on processor. |
smp | means access is processor atomic, and atomic with respect to all processors in an SMP. | |
memory | means that access is smp atomic, and atomic with respect to all access to the memory including DMA. |
javax.realtime.atomicaccess_read_byte_0_memory=trueTable entries with a value of false may be explicitly represented, but since false is the default value, such properties are redundant.
All raw memory access is treated as volatile, and serialized. The infrastructure must be forced to read memory or write to memory on each call to a raw memory objects's getter or setter method, and to complete the reads and writes in the order they appear in the program order.
Modifier and Type | Field and Description |
---|---|
static RawMemoryRegion |
IO_PORT_MAPPED_REGION
This raw memory region is predefined for access to I/O
device space implemented by processor instructions, such as the x86
in and out instructions. |
static RawMemoryRegion |
MEMORY_MAPPED_REGION
This raw memory region is predefined for requesting access to
memory mapped I/O devices.
|
Constructor and Description |
---|
RawMemoryFactory()
Creates an empty factory.
|
Modifier and Type | Method and Description |
---|---|
RawByte |
createRawByte(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawByte and
accesses memory of region in the address range described by
base , stride , and count . |
RawByteReader |
createRawByteReader(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawByteReader and
accesses memory of region in the address range described by
base , stride , and count . |
RawByteWriter |
createRawByteWriter(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawByteWriter and
accesses memory of region in the address range described by
base , stride , and count . |
RawDouble |
createRawDouble(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawDouble and
accesses memory of region in the address range described by
base , stride , and count . |
RawDoubleReader |
createRawDoubleReader(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawDoubleReader and
accesses memory of region in the address range described by
base , stride , and count . |
RawDoubleWriter |
createRawDoubleWriter(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawDoubleWriter and
accesses memory of region in the address range described by
base , stride , and count . |
RawFloat |
createRawFloat(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawFloat and
accesses memory of region in the address range described by
base , stride , and count . |
RawFloatReader |
createRawFloatReader(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawFloatReader and
accesses memory of region in the address range described by
base , stride , and count . |
RawFloatWriter |
createRawFloatWriter(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawFloatWriter and
accesses memory of region in the address range described by
base , stride , and count . |
RawInt |
createRawInt(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawInt and
accesses memory of region in the address range described by
base , stride , and count . |
RawIntReader |
createRawIntReader(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawIntReader and
accesses memory of region in the address range described by
base , stride , and count . |
RawIntWriter |
createRawIntWriter(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawIntWriter and
accesses memory of region in the address range described by
base , stride , and count . |
RawLong |
createRawLong(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawLong and
accesses memory of region in the address range described by
base , stride , and count . |
RawLongReader |
createRawLongReader(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawLongReader and
accesses memory of region in the address range described by
base , stride , and count . |
RawLongWriter |
createRawLongWriter(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawLongWriter and
accesses memory of region in the address range described by
base , stride , and count . |
RawShort |
createRawShort(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawShort and
accesses memory of region in the address range described by
base , stride , and count . |
RawShortReader |
createRawShortReader(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawShortReader and
accesses memory of region in the address range described by
base , stride , and count . |
RawShortWriter |
createRawShortWriter(RawMemoryRegion region,
long base,
int count,
int stride)
Creates an instance of a class that implements
RawShortWriter and
accesses memory of region in the address range described by
base , stride , and count . |
void |
deregister(RawMemoryRegionFactory factory)
Removes support for a new memory region.
|
static RawMemoryFactory |
getDefaultFactory()
Gets the factory with support for the platform defined regions.
|
void |
register(RawMemoryRegionFactory factory)
Adds support for a new memory region.
|
public static final RawMemoryRegion MEMORY_MAPPED_REGION
public static final RawMemoryRegion IO_PORT_MAPPED_REGION
in
and out
instructions.public RawMemoryFactory()
getDefaultFactory()
instead.
This is only useful after a RawMemoryRegionFactory
has been
added with register(RawMemoryRegionFactory)
.public static RawMemoryFactory getDefaultFactory()
public void register(RawMemoryRegionFactory factory) throws RegistrationException, NullPointerException
RegistrationException
- when the
factory
already is already registered.NullPointerException
- when factory
is null.factory
- The RawMemoryRegionFactory
instance to use for
creating RawMemory
objects for the
RawMemoryRegion
instances it makes available.public void deregister(RawMemoryRegionFactory factory) throws DeregistrationException
DeregistrationException
- when the factory
is not
registered.NullPointerException
- when factory
is null.factory
- The RawMemoryRegionFactory
to be made unavailable.public RawByte createRawByte(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawByte
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawByte ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawByte
and supports access to
the specified range in the memory region.public RawByteReader createRawByteReader(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawByteReader
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawByteReader ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawByteReader
and supports access to
the specified range in the memory region.public RawByteWriter createRawByteWriter(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawByteWriter
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawByteWriter ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawByteWriter
and supports access to
the specified range in the memory region.public RawShort createRawShort(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawShort
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawShort ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawShort
and supports access to
the specified range in the memory region.public RawShortReader createRawShortReader(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawShortReader
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawShortReader ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawShortReader
and supports access to
the specified range in the memory region.public RawShortWriter createRawShortWriter(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawShortWriter
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawShortWriter ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawShortWriter
and supports access to
the specified range in the memory region.public RawInt createRawInt(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawInt
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawInt ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawInt
and supports access to
the specified range in the memory region.public RawIntReader createRawIntReader(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawIntReader
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawIntReader ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawIntReader
and supports access to
the specified range in the memory region.public RawIntWriter createRawIntWriter(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawIntWriter
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawIntWriter ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawIntWriter
and supports access to
the specified range in the memory region.public RawLong createRawLong(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawLong
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawLong ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawLong
and supports access to
the specified range in the memory region.public RawLongReader createRawLongReader(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawLongReader
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawLongReader ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawLongReader
and supports access to
the specified range in the memory region.public RawLongWriter createRawLongWriter(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawLongWriter
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawLongWriter ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawLongWriter
and supports access to
the specified range in the memory region.public RawFloat createRawFloat(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawFloat
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawFloat ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawFloat
and supports access to
the specified range in the memory region.public RawFloatReader createRawFloatReader(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawFloatReader
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawFloatReader ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawFloatReader
and supports access to
the specified range in the memory region.public RawFloatWriter createRawFloatWriter(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawFloatWriter
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawFloatWriter ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawFloatWriter
and supports access to
the specified range in the memory region.public RawDouble createRawDouble(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawDouble
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawDouble ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawDouble
and supports access to
the specified range in the memory region.public RawDoubleReader createRawDoubleReader(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawDoubleReader
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawDoubleReader ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawDoubleReader
and supports access to
the specified range in the memory region.public RawDoubleWriter createRawDoubleWriter(RawMemoryRegion region, long base, int count, int stride) throws SecurityException, IllegalArgumentException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedRawMemoryRegionException
RawDoubleWriter
and
accesses memory of region
in the address range described by
base
, stride
, and count
.
The actual extent of the memory addressed by the object is
stride
× size of RawDoubleWriter ×
count
. The object is allocated in the current memory area
of the calling thread.SecurityException
- when the caller does not have permissions
to access the given memory region or the specified range of
addresses.IllegalArgumentException
- when base
is negative,
count
is not greater than zero, or
stride
is less than one.OffsetOutOfBoundsException
- when base
is not in
a invalid range for raw memory.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range for raw memory.UnsupportedRawMemoryRegionException
- when region
is
not registered.region
- The address space from which the new instance
should be taken.base
- The starting physical address accessible through the
returned instance.count
- The number of memory elements accessible through the
returned instance.stride
- The distance to the next element as a multiple of element
size, where 1
means the elements are adjacent in
memory.RawDoubleWriter
and supports access to
the specified range in the memory region.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.