public class RawMemoryFactory
extends java.lang.Object
register(RawMemoryRegionFactory)
methods. An application developer can use this method to add support
for any ram memory region that is not supported out of the box.
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.createRawInt(RawMemoryFactory.MEMORY_MAPPED_REGION, address, count, stride); // 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 define a
memory region by implementing a factory which can create objects to
access memory in that region. Thus, the application must implement a
factory that implements the RawMemoryRegionFactory
interface.
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 not passed to
register(RawMemoryRegionFactory)
as an argument; the name is
available to register(RawMemoryRegionFactory)
through the
factory's RawMemoryRegionFactory.getRegion()
method.
The register(RawMemoryRegionFactory)
method is only
used by application code when it needs to add support for a new
type of raw memory.
Whether an offset addresses the high-order or low-order byte is
normally based on the value of the
RealtimeSystem.BYTE_ORDER
static byte variable in class RealtimeSystem
.
If the type of memory supported by a raw memory accessor class implements
non-standard byte ordering, accessor methods in that instance
continue to select bytes starting at offset
from the
base address and continuing toward greater addresses. The accessor
instance may control the mapping of these bytes into the primitive
data type. The accessor could even select bytes that are not
contiguous. In each case the documentation for the raw memory access
factory must document any mapping other than the "normal" one
specified above.
The RawMemory
class enables a realtime program to
implement device drivers, memory-mapped I/O, flash memory,
battery-backed RAM, and similar low-level software.
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 re-storing 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 require 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 schedulable objects. A raw memory region could be updated by another schedulable object, 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 represent a four-dimensional sparse array with boolean values indicating whether that combination of access attributes is atomic. The default value for array entries is false. The dimension are
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 alignment bytes away from natural alignment. | |
Atomicity | processor | means access is atomic with respect to other taska 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 runtime 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 name is used to request access to memory mapped
I/O devices.
|
static RawMemoryRegion |
MEMORY_MAPPED_REGION
This raw memory name is used to request access to I/O device space
implemented by processor instructions.
|
Constructor and Description |
---|
RawMemoryFactory()
Create an application specific factory.
|
Modifier and Type | Method and Description |
---|---|
RawByte |
createRawByte(RawMemoryRegion region,
long base,
int count,
int stride)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Create 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)
Deregister a region factory for the region of the given factory.
|
static RawMemoryFactory |
getDefaultFactory()
Get the default factory.
|
void |
register(RawMemoryRegionFactory factory)
Register a region factory for the region of the given factory.
|
public static final RawMemoryRegion MEMORY_MAPPED_REGION
public static final RawMemoryRegion IO_PORT_MAPPED_REGION
public RawMemoryFactory()
public static RawMemoryFactory getDefaultFactory()
public void register(RawMemoryRegionFactory factory) throws RegistrationException, java.lang.NullPointerException
factory
- is a memory region factory.RegistrationException
- when another factory is already
registered for the region.java.lang.NullPointerException
- when factory is null.public void deregister(RawMemoryRegionFactory factory)
factory
- is a memory region factory.DeregistrationException
- when the given factory is not registered.java.lang.NullPointerException
- when factory is null.public RawByte createRawByte(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of byte ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawByte
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawByteReader createRawByteReader(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of byte ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawByteReader
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawByteWriter createRawByteWriter(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of byte ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawByteWriter
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawShort createRawShort(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of short ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawShort
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawShortReader createRawShortReader(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of short ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawShortReader
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawShortWriter createRawShortWriter(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of short ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawShortWriter
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawInt createRawInt(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of int ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawInt
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawIntReader createRawIntReader(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of int ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawIntReader
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawIntWriter createRawIntWriter(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of int ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawIntWriter
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawLong createRawLong(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of long ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawLong
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawLongReader createRawLongReader(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of long ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawLongReader
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawLongWriter createRawLongWriter(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of long ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawLongWriter
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawFloat createRawFloat(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of float ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawFloat
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawFloatReader createRawFloatReader(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of float ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawFloatReader
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawFloatWriter createRawFloatWriter(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of float ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawFloatWriter
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawDouble createRawDouble(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of double ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawDouble
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawDoubleReader createRawDoubleReader(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of double ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawDoubleReader
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
public RawDoubleWriter createRawDoubleWriter(RawMemoryRegion region, long base, int count, int stride) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, MemoryTypeConflictException, 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
- 1) × size of double ×
count
. The object is allocated in the current memory area
of the calling thread.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 in mulitple of element size.RawDoubleWriter
and supports access to
the specified range in the memory region.java.lang.IllegalArgumentException
- when base is negative, or count is
not greater than zero.java.lang.SecurityException
- when the caller does not have
permissions to access the given memory region or the
specified range of addresses.OffsetOutOfBoundsException
- when base
is invalid.SizeOutOfBoundsException
- when the memory addressed by the object
would extend into an invalid range of memory.MemoryTypeConflictException
- when base
does
not point to memory that matches the type served by this
factory.UnsupportedRawMemoryRegionException
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2016 aicas GmbH. All Rights Reserved.