java.lang.Object
uk.ac.manchester.tornado.api.types.collections.VectorHalf3
- All Implemented Interfaces:
Serializable,TornadoCollectionInterface<ShortBuffer>,PrimitiveStorage<ShortBuffer>
VectorHalf3 relies on preview features of the Java platform:
VectorHalf3refers to one or more preview APIs:MemorySegment.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionVectorHalf3(int numElements) Creates an empty vector.protectedVectorHalf3(int numElements, HalfFloatArray array) -
Method Summary
Modifier and TypeMethodDescriptionasBuffer()voidclear()Duplicates this vector.voidget(int index) Returns theHalf3at the given index of this vector.getArray()intlonglongvoidloadFromBuffer(ShortBuffer buffer) voidSets theHalf3at the given index of this vector.voidset(HalfFloatArray values) Sets the elements of this vector to that of the provided array.voidset(VectorHalf3 values) Sets the elements of this vector to that of the provided vector.intsize()sum()toString()int
-
Field Details
-
TYPE
-
-
Constructor Details
-
VectorHalf3
-
VectorHalf3
public VectorHalf3(int numElements) Creates an empty vector.- Parameters:
numElements-
-
-
Method Details
-
vectorWidth
public int vectorWidth() -
get
Returns theHalf3at the given index of this vector.- Parameters:
index-- Returns:
- value
-
set
Sets theHalf3at the given index of this vector.- Parameters:
index-value-
-
set
Sets the elements of this vector to that of the provided vector.- Parameters:
values-
-
set
Sets the elements of this vector to that of the provided array.- Parameters:
values-
-
fill
-
duplicate
Duplicates this vector.- Returns:
- vector
-
toString
-
sum
-
loadFromBuffer
- Specified by:
loadFromBufferin interfacePrimitiveStorage<ShortBuffer>
-
asBuffer
- Specified by:
asBufferin interfacePrimitiveStorage<ShortBuffer>
-
size
public int size()- Specified by:
sizein interfacePrimitiveStorage<ShortBuffer>
-
getLength
public int getLength() -
getArray
-
clear
public void clear() -
getNumBytes
public long getNumBytes()- Specified by:
getNumBytesin interfaceTornadoCollectionInterface<ShortBuffer>
-
getNumBytesWithHeader
public long getNumBytesWithHeader()- Specified by:
getNumBytesWithHeaderin interfaceTornadoCollectionInterface<ShortBuffer>
-
getSegment
- Specified by:
getSegmentin interfaceTornadoCollectionInterface<ShortBuffer>
-
getSegmentWithHeader
- Specified by:
getSegmentWithHeaderin interfaceTornadoCollectionInterface<ShortBuffer>
-
VectorHalf3when preview features are enabled.