uint64_t flags;
ErasureCodeIsa(const std::string &_technique,
- ErasureCodeIsaTableCache &_tcache) :
+ ErasureCodeIsaTableCache &_tcache,
+ const std::string &_m = "0") :
k(0),
m(0),
w(0),
FLAG_EC_PLUGIN_PARITY_DELTA_OPTIMIZATION;
if (technique == "reed_sol_van"sv) {
- flags |= FLAG_EC_PLUGIN_CRC_ENCODE_DECODE_SUPPORT;
- } else if (technique == "cauchy"sv && m == 1) {
- flags |= FLAG_EC_PLUGIN_CRC_ENCODE_DECODE_SUPPORT;
+ flags |= FLAG_EC_PLUGIN_CRC_ENCODE_DECODE_SUPPORT;
+ } else if (technique == "cauchy"sv && _m == "1"sv) {
+ flags |= FLAG_EC_PLUGIN_CRC_ENCODE_DECODE_SUPPORT;
}
}
ErasureCodeIsaDefault(ErasureCodeIsaTableCache &_tcache,
const std::string& technique,
- int matrix = kVandermonde) :
- ErasureCodeIsa(technique, _tcache),
+ int matrix = kVandermonde,
+ const std::string &_m = "0") :
+ ErasureCodeIsa(technique, _tcache, _m),
encode_coeff(0), encode_tbls(0)
{
matrixtype = matrix;
ErasureCodeIsa *interface;
std::string technique;
technique = profile.find("technique")->second;
+ std::string _m = profile.find("m")->second;
if ((technique == "reed_sol_van")) {
interface = new ErasureCodeIsaDefault(tcache,
technique,
- ErasureCodeIsaDefault::kVandermonde);
+ ErasureCodeIsaDefault::kVandermonde,
+ _m);
} else if ((technique == "cauchy")) {
interface = new ErasureCodeIsaDefault(tcache,
technique,
- ErasureCodeIsaDefault::kCauchy);
+ ErasureCodeIsaDefault::kCauchy,
+ _m);
} else {
*ss << "technique=" << technique << " is not a valid coding technique. "
<< " Choose one of the following: "
for(const char **technique = techniques; *technique; technique++) {
ErasureCodeInterfaceRef erasure_code;
profile["technique"] = *technique;
+ profile["m"] = "2";
EXPECT_FALSE(erasure_code);
EXPECT_EQ(0, instance.factory("isa",
g_conf().get_val<std::string>("erasure_code_dir"),