IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
AlgorithmFunctionSelector.h
1 // AlgorithmFunctionSelector.h:
3 // ----------------------------
4 //
15 
16 #ifndef __IPSDKBASEPROCESSING_ALGORITHMFUNCTIONSELECTOR_H__
17 #define __IPSDKBASEPROCESSING_ALGORITHMFUNCTIONSELECTOR_H__
18 
20 #include <IPSDKBaseProcessing/Algorithm/BaseProcessingAlgorithm.h>
21 #include <IPSDKBaseProcessing/Algorithm/Function/AlgorithmFunctionIdentifier.h>
22 #include <IPSDKBaseProcessing/Algorithm/Function/DataTypeIdentifierColl.h>
23 #include <IPSDKUtil/Dynamic/BaseDynamicObject.h>
24 
25 namespace ipsdk {
26 namespace processor {
27 
30 
32 {
33  // declare dynamic class
35 
36 // predefined public types
37 public:
40 
43 
46 
47 public:
53 
54 // methods
55 public:
57  static bool isSupported(const InstructionSetsIdentifier& instructionSetsId);
58 
60  static bool isEnabled(const InstructionSetsIdentifier& instructionSetsId);
61 
67  bool existsFunction(const FunctionId& functionId) const;
68 
73  BoolResult registerFunction(const FunctionId& functionId);
74 
85  bool isAvailableFunction(const DataTypeIdColl& dataTypeIdColl,
86  const InstructionSetsIdentifier& instructionSetsId = InstructionSetsIdentifier(),
87  const ipUInt64 nbDataByElement = -1,
88  const ipUInt64 nbInitData = 0,
89  const ipUInt64 nbFinalData = 0) const;
90 
99  const FunctionId& retrieveFunctionIdentifier(const DataTypeIdColl& dataTypeIdColl,
100  const InstructionSetsIdentifier& instructionSetsId = InstructionSetsIdentifier(),
101  const ipUInt64 nbDataByElement = -1,
102  const ipUInt64 nbInitData = 0,
103  const ipUInt64 nbFinalData = 0) const;
104 
106  void clear();
107 
108 // attributes
109 protected:
111  typedef std::multimap<ipUInt64, FunctionId> FunctionEfficiencyColl;
112 
114  typedef std::map<DataTypeIdColl, FunctionEfficiencyColl> FunctionsColl;
115 
118 };
119 
122 
123 } // end of namespace ipsdk
124 } // end of namespace processor
125 
126 #endif // __IPSDKBASEPROCESSING_ALGORITHMFUNCTIONSELECTOR_H__
Class used to select a processing function given data types informations.
Definition: AlgorithmFunctionSelector.h:31
Base class for dynamic objects.
Definition: BaseDynamicObject.h:28
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
#define IPSDKBASEPROCESSING_API
Import/Export macro for library IPSDKBaseProcessing.
Definition: IPSDKBaseProcessingExports.h:27
AlgorithmFunctionIdentifier FunctionId
algorithm function identifier type used by processing algorithm
Definition: AlgorithmFunctionSelector.h:39
std::map< DataTypeIdColl, FunctionEfficiencyColl > FunctionsColl
function identifiers sorted by data types
Definition: AlgorithmFunctionSelector.h:114
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
std::multimap< ipUInt64, FunctionId > FunctionEfficiencyColl
function identifiers sorted by efficiency
Definition: AlgorithmFunctionSelector.h:111
FunctionsColl _functionsColl
collection of function identifiers sorted by processing data types
Definition: AlgorithmFunctionSelector.h:117
Definition of import/export macro for library.
DataTypeIdentifierColl DataTypeIdColl
data type identifier collection used by processing algorithm
Definition: AlgorithmFunctionSelector.h:42
BaseProcessingAlgorithm::FunctionType FunctionType
function type used by processing algorithm
Definition: AlgorithmFunctionSelector.h:45
Class allowing to identify a processing function.
Definition: AlgorithmFunctionIdentifier.h:35
BoolResult(BaseProcessingAlgorithm::* FunctionType)(const ProcessingInfo &info)
type associated to image processing functions
Definition: BaseProcessingAlgorithm.h:52
#define IPSDK_DECLARE_DYNAMIC_WITH_COPY(libraryName, className)
macro enabling dynamic properties on class and copy support
Definition: DynamicHdrMacro.h:83
Class used for data type collection function identification.
Definition: DataTypeIdentifierColl.h:34
Class used for processor instruction sets function identification.
Definition: InstructionSetsIdentifier.h:33