| 77 | |
| 78 | template<typename R, typename Q> |
| 79 | module::Quantizer<R, Q>* |
| 80 | Quantizer ::build() const |
| 81 | { |
| 82 | if (this->type == "POW2" && this->implem == "STD") |
| 83 | return new module::Quantizer_pow2<R, Q>(this->size, this->n_decimals, this->n_bits); |
| 84 | if (this->type == "POW2" && this->implem == "FAST") |
| 85 | return new module::Quantizer_pow2_fast<R, Q>(this->size, this->n_decimals, this->n_bits); |
| 86 | if (this->type == "CUSTOM" && this->implem == "STD") |
| 87 | return new module::Quantizer_custom<R, Q>(this->size, this->range, this->n_bits); |
| 88 | if (this->type == "NO") return new module::Quantizer_NO<R, Q>(this->size); |
| 89 | |
| 90 | throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__); |
| 91 | } |
| 92 | |
| 93 | // ==================================================================================== explicit template instantiation |
| 94 | #include "Tools/types.h" |
nothing calls this directly
no outgoing calls
no test coverage detected