From 1f59802058d1b8fbd51b9f01bd400625773e714f Mon Sep 17 00:00:00 2001 From: Vasile Vilvoiu Date: Wed, 21 Jul 2021 18:32:58 +0300 Subject: Input parser template instantiation. Using std:: types. --- src/input-parser.cpp | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'src/input-parser.cpp') diff --git a/src/input-parser.cpp b/src/input-parser.cpp index 003317f..b5dd55b 100644 --- a/src/input-parser.cpp +++ b/src/input-parser.cpp @@ -41,21 +41,21 @@ std::unique_ptr InputParser::FromDataType(DataType dtype, double prescale, bool is_complex) { if (dtype == DataType::kSignedInt8) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kSignedInt16) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kSignedInt32) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kSignedInt64) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kUnsignedInt8) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kUnsignedInt16) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kUnsignedInt32) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kUnsignedInt64) { - return std::make_unique>(prescale, is_complex); + return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kFloat32) { return std::make_unique>(prescale, is_complex); } else if (dtype == DataType::kFloat64) { @@ -150,4 +150,17 @@ FloatInputParser::ParseBlock(const std::vector &block) } return count; -} \ No newline at end of file +} + +template class IntegerInputParser; +template class IntegerInputParser; +template class IntegerInputParser; +template class IntegerInputParser; + +template class IntegerInputParser; +template class IntegerInputParser; +template class IntegerInputParser; +template class IntegerInputParser; + +template class FloatInputParser; +template class FloatInputParser; -- cgit v1.2.3