MCPcopy Create free account
hub / github.com/aff3ct/aff3ct / build_userpdf

Method build_userpdf

src/Factory/Module/Channel/Channel.cpp:181–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179
180template<typename R>
181module::Channel<R>*
182Channel ::build_userpdf(const tools::Distributions<R>& dist) const
183{
184 tools::User_pdf_noise_generator_implem impl;
185 if (implem == "STD")
186 impl = tools::User_pdf_noise_generator_implem::STD;
187 else if (implem == "FAST")
188 impl = tools::User_pdf_noise_generator_implem::FAST;
189#ifdef AFF3CT_CHANNEL_MKL
190 else if (implem == "MKL")
191 impl = tools::User_pdf_noise_generator_implem::MKL;
192#endif
193#ifdef AFF3CT_CHANNEL_GSL
194 else if (implem == "GSL")
195 impl = tools::User_pdf_noise_generator_implem::GSL;
196#endif
197 else
198 throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__);
199
200 if (type == "OPTICAL") return new module::Channel_optical<R>(this->N, dist, impl, this->seed);
201
202 throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__);
203}
204
205template<typename R>
206module::Channel<R>*

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected