Package org.apfloat.spi
Interface BuilderFactory
-
- All Known Implementing Classes:
DoubleBuilderFactory,FloatBuilderFactory,IntAparapiBuilderFactory,IntBuilderFactory,LongAparapiBuilderFactory,LongBuilderFactory
public interface BuilderFactoryABuilderFactoryobject 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 theApfloatImplimplementation itself acts as the director, calling the different builders directly.- Version:
- 1.9.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidgc()Do garbage collection and related things such as empty any reference queues.<T> AdditionBuilder<T>getAdditionBuilder(java.lang.Class<T> elementType)Returns anAdditionBuilderobject.ApfloatBuildergetApfloatBuilder()Returns anApfloatBuilderobject.<T> CarryCRTBuilder<T>getCarryCRTBuilder(java.lang.Class<T> elementArrayType)Returns aCarryCRTBuilderobject.ConvolutionBuildergetConvolutionBuilder()Returns aConvolutionBuilderobject.DataStorageBuildergetDataStorageBuilder()Returns aDataStorageBuilderobject.java.lang.Class<?>getElementArrayType()Returns the element array type of the data objects created.intgetElementSize()Returns the element size of the data objects created, in bytes.java.lang.Class<?>getElementType()Returns the element type of the data objects created.ExecutionBuildergetExecutionBuilder()Returns anExecutionBuilderobject.MatrixBuildergetMatrixBuilder()Returns aMatrixBuilderobject.NTTBuildergetNTTBuilder()Returns anNTTBuilderobject.voidshutdown()Shuts down the builder factory.
-
-
-
Method Detail
-
getApfloatBuilder
ApfloatBuilder getApfloatBuilder()
Returns anApfloatBuilderobject.- Returns:
- An
ApfloatBuilderobject.
-
getDataStorageBuilder
DataStorageBuilder getDataStorageBuilder()
Returns aDataStorageBuilderobject.- Returns:
- A
DataStorageBuilderobject.
-
getAdditionBuilder
<T> AdditionBuilder<T> getAdditionBuilder(java.lang.Class<T> elementType) throws java.lang.IllegalArgumentException
Returns anAdditionBuilderobject.- Type Parameters:
T- The element type of the additions.- Parameters:
elementType- The element type of the additions.- Returns:
- An
AdditionBuilderobject. - Throws:
java.lang.IllegalArgumentException- In case of unsupported element type.- Since:
- 1.7.0
-
getConvolutionBuilder
ConvolutionBuilder getConvolutionBuilder()
Returns aConvolutionBuilderobject.- Returns:
- A
ConvolutionBuilderobject.
-
getNTTBuilder
NTTBuilder getNTTBuilder()
Returns anNTTBuilderobject.- Returns:
- An
NTTBuilderobject.
-
getMatrixBuilder
MatrixBuilder getMatrixBuilder()
Returns aMatrixBuilderobject.- Returns:
- A
MatrixBuilderobject. - Since:
- 1.7.0
-
getCarryCRTBuilder
<T> CarryCRTBuilder<T> getCarryCRTBuilder(java.lang.Class<T> elementArrayType) throws java.lang.IllegalArgumentException
Returns aCarryCRTBuilderobject.- Type Parameters:
T- The element array type of the carry-CRT.- Parameters:
elementArrayType- The element array type of the carry-CRT.- Returns:
- A
CarryCRTBuilderobject. - Throws:
java.lang.IllegalArgumentException- In case of unsupported element array type.- Since:
- 1.7.0
-
getExecutionBuilder
ExecutionBuilder getExecutionBuilder()
Returns anExecutionBuilderobject.- Returns:
- An
ExecutionBuilderobject. - Since:
- 1.9.0
-
getElementType
java.lang.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
java.lang.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
void shutdown() throws ApfloatRuntimeExceptionShuts down the builder factory. Clean-up tasks can be executed by this method. This method is invoked by theApfloatContextwhen cleanupAtExit is enabled.- Throws:
ApfloatRuntimeException- Since:
- 1.6.2
-
gc
void gc() throws ApfloatRuntimeException
Do garbage collection and related things such as empty any reference queues.- Throws:
ApfloatRuntimeException- Since:
- 1.6.2
-
-