eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UnboxedFloatArray':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: UnboxedFloatArray


Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--ArrayedCollection
            |
            +--UninterpretedBytes
               |
               +--AbstractNumberVector
                  |
                  +--UnboxedFloatArray
                     |
                     +--BFloat16Array
                     |
                     +--DoubleArray
                     |
                     +--FloatArray
                     |
                     +--HalfFloatArray

Package:
stx:libbasic
Category:
Collections-Arrayed
Version:
rev: 1.12 date: 2021/12/07 23:35:20
user: cg
file: UnboxedFloatArray.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


An abstract superclass for all unboxed float classes.

In contrast to normal arrays (which store pointers to their elements),
unboxedFloatArrays store the values in a dense & compact way. 

Since the representation fits corresponding underlying C-language representations,
these are also useful to pass bulk data to/from C primitive code.

copyright

COPYRIGHT (c) 2019 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

queries
o  fmax
return the largest value that instances of me can represent

** This method must be redefined in concrete classes (subclassResponsibility) **

o  fmin
return the smallest normalized non-zero value that instances of me can hold

** This method must be redefined in concrete classes (subclassResponsibility) **

o  isAbstract
Return if this class is an abstract class.
True is returned for UnboxedFloatArray here; false for subclasses.
Abstract subclasses must redefine this again.

o  isValidElement: anObject
return true, if instance of me can hold this kind of object

o  maxVal
the minimum value which can be stored in instances of me

o  minVal
the minimum value which can be stored in instances of me

o  precision
answer the precision (the number of bits in the mantissa) of my elements (in bits)
If my elements are IEEE floats, where only the fraction from the normalized mantissa is stored,
there will be a hidden bit and the mantissa will be actually represented by 1 more binary digits
(i.e. the number returned is 1 plus the actual number of bits stored)
any hidden bit is included here

** This method must be redefined in concrete classes (subclassResponsibility) **


Instance protocol:

arithmetic destructive
o  /= anObject
divide the argument into the receiver (destructive).
The argument may either be a scalar or another vector

queries
o  defaultElement

o  numFloats
this is a leftover compatibility method; do not use

testing
o  isFloat32Array
return true if the receiver has float32 elements

o  isFloat64Array
return true if the receiver has float64 elements

o  isFloatArray
return true if the receiver has float elements.
These are Float-, Double and HalfFloat arrays

o  isUnboxedFloatArray
return true if the receiver has float elements.
These are Float, Double- and HalfFloat arrays



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 27 Jul 2024 03:18:03 GMT