| 82 | |
| 83 | template<typename B> |
| 84 | spu::module::Source<B>* |
| 85 | Source ::build() const |
| 86 | { |
| 87 | if (this->type == "RAND") |
| 88 | { |
| 89 | if (this->implem == "STD") |
| 90 | return new spu::module::Source_random<B>(this->K, this->seed); |
| 91 | else if (this->implem == "FAST") |
| 92 | return new module::Source_random_fast<B>(this->K, this->seed); |
| 93 | } |
| 94 | |
| 95 | if (this->type == "AZCW") return new spu::module::Source_AZCW<B>(this->K); |
| 96 | if (this->type == "USER") return new spu::module::Source_user<B>(this->K, this->path, this->start_idx); |
| 97 | |
| 98 | if (this->type == "USER_BIN") |
| 99 | return new spu::module::Source_user_binary<B>(this->K, this->path, this->auto_reset, this->fifo_mode); |
| 100 | |
| 101 | throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__); |
| 102 | } |
| 103 | |
| 104 | // ==================================================================================== explicit template instantiation |
| 105 | #include "Tools/types.h" |
nothing calls this directly
no outgoing calls
no test coverage detected