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

Method build

src/Factory/Module/Decoder/LDPC/Decoder_LDPC.cpp:1129–1173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1127
1128template<typename B, typename Q>
1129module::Decoder_SIHO<B, Q>*
1130Decoder_LDPC ::build(const tools::Sparse_matrix& H,
1131 const std::vector<unsigned>& info_bits_pos,
1132 module::Encoder<B>* encoder) const
1133{
1134 try
1135 {
1136 return Decoder::build<B, Q>(encoder);
1137 }
1138 catch (spu::tools::cannot_allocate const&)
1139 {
1140 if ((this->type == "BP" || this->type == "BP_FLOODING") && this->simd_strategy.empty())
1141 {
1142 if (this->implem == "GALA")
1143 return new module::Decoder_LDPC_BP_flooding_GALA<B, Q>(
1144 this->K, this->N_cw, this->n_ite, H, info_bits_pos, this->enable_syndrome, this->syndrome_depth);
1145 if (this->implem == "GALB")
1146 return new module::Decoder_LDPC_BP_flooding_GALB<B, Q>(
1147 this->K, this->N_cw, this->n_ite, H, info_bits_pos, this->enable_syndrome, this->syndrome_depth);
1148 if (this->implem == "GALE")
1149 return new module::Decoder_LDPC_BP_flooding_GALE<B, Q>(
1150 this->K, this->N_cw, this->n_ite, H, info_bits_pos, this->enable_syndrome, this->syndrome_depth);
1151 }
1152 else if (this->type == "BP_PEELING")
1153 {
1154 if (this->implem == "STD")
1155 return new module::Decoder_LDPC_BP_peeling<B, Q>(
1156 this->K, this->N_cw, this->n_ite, H, info_bits_pos, this->enable_syndrome, this->syndrome_depth);
1157 }
1158 else if (this->type == "BIT_FLIPPING")
1159 {
1160 if (this->implem == "PPBF")
1161 return new module::Decoder_LDPC_PPBF<B, Q>(this->K,
1162 this->N_cw,
1163 this->n_ite,
1164 H,
1165 info_bits_pos,
1166 this->ppbf_proba,
1167 this->enable_syndrome,
1168 this->syndrome_depth,
1169 this->seed);
1170 }
1171 return build_siso<B, Q>(H, info_bits_pos);
1172 }
1173}
1174
1175// ==================================================================================== explicit template instantiation
1176#include "Tools/types.h"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected