aboutsummaryrefslogtreecommitdiff
path: root/src/graph
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-11-30 16:30:43 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2018-12-03 13:47:53 +0000
commit323ce0f0b06bca785959913e75e1f51d383c351a (patch)
treedc3729e19a43d8290285987c51d9799581412c33 /src/graph
parent08a4517905da959b6e3401cc24f5e2018f9b51ac (diff)
downloadComputeLibrary-323ce0f0b06bca785959913e75e1f51d383c351a.tar.gz
COMPMID-1819 Add option to build library with -fno-exceptions
Change-Id: I3de6bb33746d52f8d8c337ab7776eccee8c205fb Reviewed-on: https://review.mlplatform.org/328 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph')
-rw-r--r--src/graph/TypeLoader.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/graph/TypeLoader.cpp b/src/graph/TypeLoader.cpp
index 30a3546821..096188a7f9 100644
--- a/src/graph/TypeLoader.cpp
+++ b/src/graph/TypeLoader.cpp
@@ -38,14 +38,19 @@ arm_compute::DataType data_type_from_name(const std::string &name)
{ "qasymm8", DataType::QASYMM8 },
};
+#ifndef ARM_COMPUTE_EXCEPTIONS_DISABLED
try
{
+#endif /* ARM_COMPUTE_EXCEPTIONS_DISABLED */
return data_types.at(arm_compute::utility::tolower(name));
+
+#ifndef ARM_COMPUTE_EXCEPTIONS_DISABLED
}
catch(const std::out_of_range &)
{
throw std::invalid_argument(name);
}
+#endif /* ARM_COMPUTE_EXCEPTIONS_DISABLED */
}
arm_compute::DataLayout data_layout_from_name(const std::string &name)
@@ -56,14 +61,19 @@ arm_compute::DataLayout data_layout_from_name(const std::string &name)
{ "nchw", DataLayout::NCHW },
};
+#ifndef ARM_COMPUTE_EXCEPTIONS_DISABLED
try
{
+#endif /* ARM_COMPUTE_EXCEPTIONS_DISABLED */
return data_layouts.at(arm_compute::utility::tolower(name));
+
+#ifndef ARM_COMPUTE_EXCEPTIONS_DISABLED
}
catch(const std::out_of_range &)
{
throw std::invalid_argument(name);
}
+#endif /* ARM_COMPUTE_EXCEPTIONS_DISABLED */
}
namespace graph
{
@@ -76,14 +86,19 @@ Target target_from_name(const std::string &name)
{ "gles", Target::GC },
};
+#ifndef ARM_COMPUTE_EXCEPTIONS_DISABLED
try
{
+#endif /* ARM_COMPUTE_EXCEPTIONS_DISABLED */
return targets.at(arm_compute::utility::tolower(name));
+
+#ifndef ARM_COMPUTE_EXCEPTIONS_DISABLED
}
catch(const std::out_of_range &)
{
throw std::invalid_argument(name);
}
+#endif /* ARM_COMPUTE_EXCEPTIONS_DISABLED */
}
} // namespace graph
} // namespace arm_compute