aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm_compute/runtime/CL/SVMMemory.h51
-rw-r--r--examples/graph_alexnet.cpp4
2 files changed, 28 insertions, 27 deletions
diff --git a/arm_compute/runtime/CL/SVMMemory.h b/arm_compute/runtime/CL/SVMMemory.h
index 1c90c274d3..9029388c70 100644
--- a/arm_compute/runtime/CL/SVMMemory.h
+++ b/arm_compute/runtime/CL/SVMMemory.h
@@ -26,31 +26,32 @@
namespace arm_compute
{
- class SVMMemory final
+class SVMMemory final
+{
+public:
+ SVMMemory() = default;
+ SVMMemory(void *ptr, bool fine_grain)
+ : _ptr(ptr), _fine_grain(fine_grain), _size(0)
+ {
+ }
+ void *ptr() const
+ {
+ return _ptr;
+ }
+ bool fine_grain() const
{
- public:
- SVMMemory() = default;
- SVMMemory(void *ptr, bool fine_grain)
- : _ptr(ptr), _fine_grain(fine_grain), _size(0)
- {
- }
- void *ptr() const
- {
- return _ptr;
- }
- bool fine_grain() const
- {
- return _fine_grain;
- }
- size_t size() const
- {
- return _size;
- }
- void *allocate(cl_context context, size_t size, cl_svm_mem_flags flags, cl_uint alignment);
- private:
- void *_ptr{ nullptr };
- bool _fine_grain{ false };
- size_t _size{ 0 };
- };
+ return _fine_grain;
+ }
+ size_t size() const
+ {
+ return _size;
+ }
+ void *allocate(cl_context context, size_t size, cl_svm_mem_flags flags, cl_uint alignment);
+
+private:
+ void *_ptr{ nullptr };
+ bool _fine_grain{ false };
+ size_t _size{ 0 };
+};
}
#endif /* __ARM_COMPUTE_SVMMEMORY_H__ */
diff --git a/examples/graph_alexnet.cpp b/examples/graph_alexnet.cpp
index 885db337e9..418d1ea071 100644
--- a/examples/graph_alexnet.cpp
+++ b/examples/graph_alexnet.cpp
@@ -53,8 +53,8 @@ public:
std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb);
// Set target. 0 (NEON), 1 (OpenCL), 2 (OpenCL with Tuner). By default it is NEON
- const int target = argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0;
- Target target_hint = set_target_hint2(target);
+ const int target = argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0;
+ Target target_hint = set_target_hint2(target);
// TODO (geopin01) : Get GPU target somehow and set gemm also for midgard ?
const bool is_gemm_convolution5x5 = (target_hint == Target::NEON);