Package org.apfloat.spi
Interface BuilderFactory
- All Known Implementing Classes:
DoubleBuilderFactory
,FloatBuilderFactory
,IntAparapiBuilderFactory
,IntBuilderFactory
,LongAparapiBuilderFactory
,LongBuilderFactory
public interface BuilderFactory
A
BuilderFactory
object contains factory methods for building
the various parts of an apfloat using the Builder pattern. There
is no separate "director" object in the apfloat SPI; it is suggested
that the ApfloatImpl
implementation itself acts as the director,
calling the different builders directly.- Version:
- 1.9.0
- Author:
- Mikko Tommila
-
Method Summary
Modifier and TypeMethodDescriptionvoid
gc()
Do garbage collection and related things such as empty any reference queues.<T> AdditionBuilder
<T> getAdditionBuilder
(Class<T> elementType) Returns anAdditionBuilder
object.Returns anApfloatBuilder
object.<T> CarryCRTBuilder
<T> getCarryCRTBuilder
(Class<T> elementArrayType) Returns aCarryCRTBuilder
object.Returns aConvolutionBuilder
object.Returns aDataStorageBuilder
object.Class
<?> Returns the element array type of the data objects created.int
Returns the element size of the data objects created, in bytes.Class
<?> Returns the element type of the data objects created.Returns anExecutionBuilder
object.Returns aMatrixBuilder
object.Returns anNTTBuilder
object.void
shutdown()
Shuts down the builder factory.
-
Method Details
-
getApfloatBuilder
ApfloatBuilder getApfloatBuilder()Returns anApfloatBuilder
object.- Returns:
- An
ApfloatBuilder
object.
-
getDataStorageBuilder
DataStorageBuilder getDataStorageBuilder()Returns aDataStorageBuilder
object.- Returns:
- A
DataStorageBuilder
object.
-
getAdditionBuilder
Returns anAdditionBuilder
object.- Type Parameters:
T
- The element type of the additions.- Parameters:
elementType
- The element type of the additions.- Returns:
- An
AdditionBuilder
object. - Throws:
IllegalArgumentException
- In case of unsupported element type.- Since:
- 1.7.0
-
getConvolutionBuilder
ConvolutionBuilder getConvolutionBuilder()Returns aConvolutionBuilder
object.- Returns:
- A
ConvolutionBuilder
object.
-
getNTTBuilder
-
getMatrixBuilder
MatrixBuilder getMatrixBuilder()Returns aMatrixBuilder
object.- Returns:
- A
MatrixBuilder
object. - Since:
- 1.7.0
-
getCarryCRTBuilder
<T> CarryCRTBuilder<T> getCarryCRTBuilder(Class<T> elementArrayType) throws IllegalArgumentException Returns aCarryCRTBuilder
object.- Type Parameters:
T
- The element array type of the carry-CRT.- Parameters:
elementArrayType
- The element array type of the carry-CRT.- Returns:
- A
CarryCRTBuilder
object. - Throws:
IllegalArgumentException
- In case of unsupported element array type.- Since:
- 1.7.0
-
getExecutionBuilder
ExecutionBuilder getExecutionBuilder()Returns anExecutionBuilder
object.- Returns:
- An
ExecutionBuilder
object. - Since:
- 1.9.0
-
getElementType
Class<?> getElementType()Returns the element type of the data objects created.- Returns:
- The element type of the data objects created.
- Since:
- 1.7.0
-
getElementArrayType
Class<?> getElementArrayType()Returns the element array type of the data objects created.- Returns:
- The element array type of the data objects created.
- Since:
- 1.7.0
-
getElementSize
int getElementSize()Returns the element size of the data objects created, in bytes.- Returns:
- The element size of the data objects created, in bytes.
- Since:
- 1.7.0
-
shutdown
Shuts down the builder factory. Clean-up tasks can be executed by this method. This method is invoked by theApfloatContext
when cleanupAtExit is enabled.- Throws:
ApfloatRuntimeException
- Since:
- 1.6.2
-
gc
Do garbage collection and related things such as empty any reference queues.- Throws:
ApfloatRuntimeException
- Since:
- 1.6.2
-