-/// Algorithms - Algorithms stores a map from Format to ARMAlgorithm*.
-static std::vector<ARMAlgorithm*> Algorithms;
-
-/// GetInstance - GetInstance returns an instance of ARMAlgorithm given the
-/// encoding Format. API clients should not free up the returned instance.
-ARMAlgorithm *ARMAlgorithm::GetInstance(ARMFormat Format) {
- /// Init the first time.
- if (Algorithms.size() == 0) {
- Algorithms.resize(array_lengthof(FuncPtrs));
- for (unsigned i = 0, num = array_lengthof(FuncPtrs); i < num; ++i)
- if (FuncPtrs[i])
- Algorithms[i] = new ARMAlgorithm(FuncPtrs[i]);
- else
- Algorithms[i] = NULL;
- }
- return Algorithms[Format];
-}
-
-