arm_compute v19.11
diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp
index 00165cd..71bfc37 100644
--- a/utils/GraphUtils.cpp
+++ b/utils/GraphUtils.cpp
@@ -28,9 +28,14 @@
#include "arm_compute/core/Types.h"
#include "arm_compute/graph/Logger.h"
#include "arm_compute/runtime/SubTensor.h"
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "utils/ImageLoader.h"
+#pragma GCC diagnostic pop
#include "utils/Utils.h"
+#include <inttypes.h>
#include <iomanip>
#include <limits>
@@ -63,17 +68,33 @@
}
void TFPreproccessor::preprocess(ITensor &tensor)
{
+ if(tensor.info()->data_type() == DataType::F32)
+ {
+ preprocess_typed<float>(tensor);
+ }
+ else if(tensor.info()->data_type() == DataType::F16)
+ {
+ preprocess_typed<half>(tensor);
+ }
+ else
+ {
+ ARM_COMPUTE_ERROR("NOT SUPPORTED!");
+ }
+}
+
+template <typename T>
+void TFPreproccessor::preprocess_typed(ITensor &tensor)
+{
Window window;
window.use_tensor_dimensions(tensor.info()->tensor_shape());
const float range = _max_range - _min_range;
-
execute_window_loop(window, [&](const Coordinates & id)
{
- const float value = *reinterpret_cast<float *>(tensor.ptr_to_element(id));
- float res = value / 255.f; // Normalize to [0, 1]
- res = res * range + _min_range; // Map to [min_range, max_range]
- *reinterpret_cast<float *>(tensor.ptr_to_element(id)) = res;
+ const T value = *reinterpret_cast<T *>(tensor.ptr_to_element(id));
+ float res = value / 255.f; // Normalize to [0, 1]
+ res = res * range + _min_range; // Map to [min_range, max_range]
+ *reinterpret_cast<T *>(tensor.ptr_to_element(id)) = res;
});
}
@@ -88,15 +109,31 @@
void CaffePreproccessor::preprocess(ITensor &tensor)
{
+ if(tensor.info()->data_type() == DataType::F32)
+ {
+ preprocess_typed<float>(tensor);
+ }
+ else if(tensor.info()->data_type() == DataType::F16)
+ {
+ preprocess_typed<half>(tensor);
+ }
+ else
+ {
+ ARM_COMPUTE_ERROR("NOT SUPPORTED!");
+ }
+}
+
+template <typename T>
+void CaffePreproccessor::preprocess_typed(ITensor &tensor)
+{
Window window;
window.use_tensor_dimensions(tensor.info()->tensor_shape());
-
const int channel_idx = get_data_layout_dimension_index(tensor.info()->data_layout(), DataLayoutDimension::CHANNEL);
execute_window_loop(window, [&](const Coordinates & id)
{
- const float value = *reinterpret_cast<float *>(tensor.ptr_to_element(id)) - _mean[id[channel_idx]];
- *reinterpret_cast<float *>(tensor.ptr_to_element(id)) = value * _scale;
+ const T value = *reinterpret_cast<T *>(tensor.ptr_to_element(id)) - T(_mean[id[channel_idx]]);
+ *reinterpret_cast<T *>(tensor.ptr_to_element(id)) = value * T(_scale);
});
}
@@ -186,6 +223,19 @@
return false;
}
+#ifdef ARM_COMPUTE_ASSERTS_ENABLED
+PrintAccessor::PrintAccessor(std::ostream &output_stream, IOFormatInfo io_fmt)
+ : _output_stream(output_stream), _io_fmt(io_fmt)
+{
+}
+
+bool PrintAccessor::access_tensor(ITensor &tensor)
+{
+ tensor.print(_output_stream, _io_fmt);
+ return false;
+}
+#endif /* ARM_COMPUTE_ASSERTS_ENABLED */
+
SaveNumPyAccessor::SaveNumPyAccessor(std::string npy_name, const bool is_fortran)
: _npy_name(std::move(npy_name)), _is_fortran(is_fortran)
{
@@ -222,9 +272,9 @@
{
std::tie(permuted_shape, perm) = compute_permutation_parameters(tensor.info()->tensor_shape(), tensor.info()->data_layout());
}
- ARM_COMPUTE_EXIT_ON_MSG(image_loader->width() != permuted_shape.x() || image_loader->height() != permuted_shape.y(),
- "Failed to load image file: dimensions [%d,%d] not correct, expected [%d,%d].",
- image_loader->width(), image_loader->height(), permuted_shape.x(), permuted_shape.y());
+ ARM_COMPUTE_EXIT_ON_MSG_VAR(image_loader->width() != permuted_shape.x() || image_loader->height() != permuted_shape.y(),
+ "Failed to load image file: dimensions [%d,%d] not correct, expected [%" PRIu32 ",%" PRIu32 "].",
+ image_loader->width(), image_loader->height(), permuted_shape.x(), permuted_shape.y());
// Fill the tensor with the PPM content (BGR)
image_loader->fill_planar_tensor(tensor, _bgr);
@@ -274,7 +324,7 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Accessing %s: %s", image_list.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", image_list.c_str(), e.what());
}
}
@@ -298,9 +348,9 @@
std::tie(permuted_shape, perm) = compute_permutation_parameters(tensor.info()->tensor_shape(),
tensor.info()->data_layout());
}
- ARM_COMPUTE_EXIT_ON_MSG(jpeg.width() != permuted_shape.x() || jpeg.height() != permuted_shape.y(),
- "Failed to load image file: dimensions [%d,%d] not correct, expected [%d,%d].",
- jpeg.width(), jpeg.height(), permuted_shape.x(), permuted_shape.y());
+ ARM_COMPUTE_EXIT_ON_MSG_VAR(jpeg.width() != permuted_shape.x() || jpeg.height() != permuted_shape.y(),
+ "Failed to load image file: dimensions [%d,%d] not correct, expected [%" PRIu32 ",%" PRIu32 "].",
+ jpeg.width(), jpeg.height(), permuted_shape.x(), permuted_shape.y());
// Fill the tensor with the JPEG content (BGR)
jpeg.fill_planar_tensor(tensor, _bgr);
@@ -347,7 +397,7 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Accessing %s: %s", image_list.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", image_list.c_str(), e.what());
}
}
@@ -370,6 +420,9 @@
case DataType::QASYMM8:
tensor_results = access_predictions_tensor<uint8_t>(tensor);
break;
+ case DataType::F16:
+ tensor_results = access_predictions_tensor<half>(tensor);
+ break;
case DataType::F32:
tensor_results = access_predictions_tensor<float>(tensor);
break;
@@ -460,7 +513,7 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Accessing %s: %s", labels_path.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", labels_path.c_str(), e.what());
}
}
@@ -531,7 +584,7 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Accessing %s: %s", labels_path.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", labels_path.c_str(), e.what());
}
}
diff --git a/utils/GraphUtils.h b/utils/GraphUtils.h
index 3417135..d6bae3e 100644
--- a/utils/GraphUtils.h
+++ b/utils/GraphUtils.h
@@ -70,6 +70,9 @@
void preprocess(ITensor &tensor) override;
private:
+ template <typename T>
+ void preprocess_typed(ITensor &tensor);
+
std::array<float, 3> _mean;
bool _bgr;
float _scale;
@@ -90,6 +93,9 @@
void preprocess(ITensor &tensor) override;
private:
+ template <typename T>
+ void preprocess_typed(ITensor &tensor);
+
float _min_range;
float _max_range;
};
@@ -193,6 +199,33 @@
const bool _is_fortran;
};
+/** Print accessor class
+ * @note The print accessor will print only when asserts are enabled.
+ * */
+class PrintAccessor final : public graph::ITensorAccessor
+{
+public:
+ /** Constructor
+ *
+ * @param[out] output_stream (Optional) Output stream
+ * @param[in] io_fmt (Optional) Format information
+ */
+ PrintAccessor(std::ostream &output_stream = std::cout, IOFormatInfo io_fmt = IOFormatInfo());
+ /** Allow instances of this class to be move constructed */
+ PrintAccessor(PrintAccessor &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ PrintAccessor(const PrintAccessor &) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ PrintAccessor &operator=(const PrintAccessor &) = delete;
+
+ // Inherited methods overriden:
+ bool access_tensor(ITensor &tensor) override;
+
+private:
+ std::ostream &_output_stream;
+ IOFormatInfo _io_fmt;
+};
+
/** Image accessor class */
class ImageAccessor final : public graph::ITensorAccessor
{
@@ -480,7 +513,7 @@
const std::string &image_file_lower = lower_string(image_file);
if(arm_compute::utility::endswith(image_file_lower, ".npy"))
{
- return arm_compute::support::cpp14::make_unique<NumPyBinLoader>(image_file);
+ return arm_compute::support::cpp14::make_unique<NumPyBinLoader>(image_file, graph_parameters.data_layout);
}
else if(arm_compute::utility::endswith(image_file_lower, ".jpeg")
|| arm_compute::utility::endswith(image_file_lower, ".jpg")
@@ -512,6 +545,7 @@
bool is_validation = false,
std::ostream &output_stream = std::cout)
{
+ ARM_COMPUTE_UNUSED(is_validation);
if(!graph_parameters.validation_file.empty())
{
return arm_compute::support::cpp14::make_unique<ValidationOutputAccessor>(graph_parameters.validation_file,
@@ -545,6 +579,7 @@
bool is_validation = false,
std::ostream &output_stream = std::cout)
{
+ ARM_COMPUTE_UNUSED(is_validation);
if(!graph_parameters.validation_file.empty())
{
return arm_compute::support::cpp14::make_unique<ValidationOutputAccessor>(graph_parameters.validation_file,
@@ -607,6 +642,17 @@
}
}
+/** Generates print tensor accessor
+ *
+ * @param[out] output_stream (Optional) Output stream
+ *
+ * @return A print tensor accessor
+ */
+inline std::unique_ptr<graph::ITensorAccessor> get_print_output_accessor(std::ostream &output_stream = std::cout)
+{
+ return arm_compute::support::cpp14::make_unique<PrintAccessor>(output_stream);
+}
+
/** Permutes a given tensor shape given the input and output data layout
*
* @param[in] tensor_shape Tensor shape to permute
diff --git a/utils/ImageLoader.h b/utils/ImageLoader.h
index 24fcbe1..497320e 100644
--- a/utils/ImageLoader.h
+++ b/utils/ImageLoader.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -33,6 +33,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
#include "stb/stb_image.h"
#pragma GCC diagnostic pop
@@ -203,7 +204,7 @@
unsigned char green = 0;
unsigned char blue = 0;
- execute_window_loop(window, [&](const Coordinates & id)
+ execute_window_loop(window, [&](const Coordinates &)
{
red = _feeder->get();
green = _feeder->get();
@@ -225,7 +226,7 @@
Iterator out(&image, window);
size_t row_size = _width * image.info()->element_size();
- execute_window_loop(window, [&](const Coordinates & id)
+ execute_window_loop(window, [&](const Coordinates &)
{
_feeder->get_row(out.ptr(), row_size);
},
@@ -242,21 +243,21 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Loading image file: %s", e.what());
+ ARM_COMPUTE_ERROR_VAR("Loading image file: %s", e.what());
}
}
/** Fill a tensor with 3 planes (one for each channel) with the content of the currently open image file.
*
* @note If the image is a CLImage, the function maps and unmaps the image
*
- * @param[in,out] tensor Tensor with 3 planes to fill (Must be allocated, and of matching dimensions with the opened image). Data types supported: U8/F32
+ * @param[in,out] tensor Tensor with 3 planes to fill (Must be allocated, and of matching dimensions with the opened image). Data types supported: U8/F16/F32
* @param[in] bgr (Optional) Fill the first plane with blue channel (default = false)
*/
template <typename T>
void fill_planar_tensor(T &tensor, bool bgr = false)
{
ARM_COMPUTE_ERROR_ON(!is_open());
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(&tensor, 1, DataType::U8, DataType::F32);
+ ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(&tensor, 1, DataType::U8, DataType::QASYMM8, DataType::F32, DataType::F16);
const DataLayout data_layout = tensor.info()->data_layout();
const TensorShape tensor_shape = tensor.info()->tensor_shape();
@@ -302,7 +303,7 @@
unsigned char green = 0;
unsigned char blue = 0;
- execute_window_loop(window, [&](const Coordinates & id)
+ execute_window_loop(window, [&](const Coordinates &)
{
red = _feeder->get();
green = _feeder->get();
@@ -311,6 +312,7 @@
switch(tensor.info()->data_type())
{
case DataType::U8:
+ case DataType::QASYMM8:
{
*(out.ptr() + 0 * stride_z) = bgr ? blue : red;
*(out.ptr() + 1 * stride_z) = green;
@@ -324,6 +326,13 @@
*reinterpret_cast<float *>(out.ptr() + 2 * stride_z) = static_cast<float>(bgr ? red : blue);
break;
}
+ case DataType::F16:
+ {
+ *reinterpret_cast<half *>(out.ptr() + 0 * stride_z) = static_cast<half>(bgr ? blue : red);
+ *reinterpret_cast<half *>(out.ptr() + 1 * stride_z) = static_cast<half>(green);
+ *reinterpret_cast<half *>(out.ptr() + 2 * stride_z) = static_cast<half>(bgr ? red : blue);
+ break;
+ }
default:
{
ARM_COMPUTE_ERROR("Unsupported data type");
@@ -337,7 +346,7 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Loading image file: %s", e.what());
+ ARM_COMPUTE_ERROR_VAR("Loading image file: %s", e.what());
}
}
@@ -345,6 +354,7 @@
/** Validate metadata */
virtual void validate_info(const ITensorInfo *tensor_info)
{
+ ARM_COMPUTE_UNUSED(tensor_info);
}
protected:
@@ -379,14 +389,14 @@
unsigned int max_val = 0;
std::tie(_width, _height, max_val) = parse_ppm_header(_fs);
- ARM_COMPUTE_ERROR_ON_MSG(max_val >= 256, "2 bytes per colour channel not supported in file %s",
- filename.c_str());
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(max_val >= 256, "2 bytes per colour channel not supported in file %s",
+ filename.c_str());
_feeder = support::cpp14::make_unique<FileImageFeeder>(_fs);
}
catch(std::runtime_error &e)
{
- ARM_COMPUTE_ERROR("Accessing %s: %s", filename.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", filename.c_str(), e.what());
}
}
void close() override
@@ -411,7 +421,7 @@
ARM_COMPUTE_ERROR_ON_MSG((end_position - current_position) < tensor_info->tensor_shape().total_size(),
"Not enough data in file");
- ARM_COMPUTE_UNUSED(end_position);
+ ARM_COMPUTE_UNUSED(end_position, tensor_info);
}
private:
@@ -449,7 +459,7 @@
uint8_t *rgb_image = stbi_load(filename.c_str(), &width, &height, &bpp, 3);
if(rgb_image == NULL)
{
- ARM_COMPUTE_ERROR("Accessing %s failed", filename.c_str());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s failed", filename.c_str());
}
else
{
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index f51d236..ede2ea4 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -379,6 +379,9 @@
case ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU:
os << "LU_BOUNDED_RELU";
break;
+ case ActivationLayerInfo::ActivationFunction::ELU:
+ os << "ELU";
+ break;
case ActivationLayerInfo::ActivationFunction::SQUARE:
os << "SQUARE";
break;
@@ -640,6 +643,9 @@
case DataType::QSYMM16:
os << "QSYMM16";
break;
+ case DataType::QASYMM16:
+ os << "QASYMM16";
+ break;
case DataType::U32:
os << "U32";
break;
diff --git a/utils/Utils.cpp b/utils/Utils.cpp
index baf829b..80b47d7 100644
--- a/utils/Utils.cpp
+++ b/utils/Utils.cpp
@@ -24,6 +24,7 @@
#include "Utils.h"
#ifdef ARM_COMPUTE_CL
+#include "arm_compute/core/CL/CLKernelLibrary.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
#endif /* ARM_COMPUTE_CL */
@@ -34,6 +35,8 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
#define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h"
#pragma GCC diagnostic pop
@@ -184,7 +187,7 @@
}
catch(std::runtime_error &e)
{
- ARM_COMPUTE_ERROR("Accessing %s: %s", filename.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", filename.c_str(), e.what());
}
return type;
@@ -313,6 +316,8 @@
}
cache_file.close();
}
+#else /* ARM_COMPUTE_CL */
+ ARM_COMPUTE_UNUSED(filename);
#endif /* ARM_COMPUTE_CL */
}
@@ -347,6 +352,8 @@
ARM_COMPUTE_ERROR("Cannot open cache file");
}
}
+#else /* ARM_COMPUTE_CL */
+ ARM_COMPUTE_UNUSED(filename);
#endif /* ARM_COMPUTE_CL */
}
} // namespace utils
diff --git a/utils/Utils.h b/utils/Utils.h
index cc5dfba..752271c 100644
--- a/utils/Utils.h
+++ b/utils/Utils.h
@@ -30,7 +30,11 @@
#include "arm_compute/core/Validate.h"
#include "arm_compute/core/Window.h"
#include "arm_compute/runtime/Tensor.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
#include "libnpy/npy.hpp"
+#pragma GCC diagnostic pop
#include "support/ToolchainSupport.h"
#ifdef ARM_COMPUTE_CL
@@ -79,6 +83,7 @@
*/
virtual bool do_setup(int argc, char **argv)
{
+ ARM_COMPUTE_UNUSED(argc, argv);
return true;
};
/** Run the example. */
@@ -172,6 +177,7 @@
case DataType::QSYMM8_PER_CHANNEL:
return no_endianness + "i" + support::cpp11::to_string(sizeof(int8_t));
case DataType::U16:
+ case DataType::QASYMM16:
return endianness + "u" + support::cpp11::to_string(sizeof(uint16_t));
case DataType::S16:
case DataType::QSYMM16:
@@ -338,7 +344,7 @@
try
{
_fs.open(npy_filename, std::ios::in | std::ios::binary);
- ARM_COMPUTE_EXIT_ON_MSG(!_fs.good(), "Failed to load binary data from %s", npy_filename.c_str());
+ ARM_COMPUTE_EXIT_ON_MSG_VAR(!_fs.good(), "Failed to load binary data from %s", npy_filename.c_str());
_fs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
_file_layout = file_layout;
@@ -346,7 +352,7 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Accessing %s: %s", npy_filename.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", npy_filename.c_str(), e.what());
}
}
/** Return true if a NPY file is currently open */
@@ -399,7 +405,7 @@
void fill_tensor(T &tensor)
{
ARM_COMPUTE_ERROR_ON(!is_open());
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_NOT_IN(&tensor, arm_compute::DataType::QASYMM8, arm_compute::DataType::S32, arm_compute::DataType::F32);
+ ARM_COMPUTE_ERROR_ON_DATA_TYPE_NOT_IN(&tensor, arm_compute::DataType::QASYMM8, arm_compute::DataType::S32, arm_compute::DataType::F32, arm_compute::DataType::F16);
try
{
// Map buffer if creating a CLTensor
@@ -515,7 +521,7 @@
}
catch(const std::ifstream::failure &e)
{
- ARM_COMPUTE_ERROR("Loading NPY file: %s", e.what());
+ ARM_COMPUTE_ERROR_VAR("Loading NPY file: %s", e.what());
}
}
@@ -568,7 +574,7 @@
arm_compute::Iterator in(&tensor, window);
- arm_compute::execute_window_loop(window, [&](const arm_compute::Coordinates & id)
+ arm_compute::execute_window_loop(window, [&](const arm_compute::Coordinates &)
{
const unsigned char value = *in.ptr();
@@ -586,7 +592,7 @@
arm_compute::Iterator in(&tensor, window);
- arm_compute::execute_window_loop(window, [&](const arm_compute::Coordinates & id)
+ arm_compute::execute_window_loop(window, [&](const arm_compute::Coordinates &)
{
fs.write(reinterpret_cast<std::fstream::char_type *>(in.ptr()), width * tensor.info()->element_size());
},
@@ -603,7 +609,7 @@
}
catch(const std::ofstream::failure &e)
{
- ARM_COMPUTE_ERROR("Writing %s: (%s)", ppm_filename.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Writing %s: (%s)", ppm_filename.c_str(), e.what());
}
}
@@ -651,7 +657,7 @@
arm_compute::Iterator in(&tensor, window);
- arm_compute::execute_window_loop(window, [&](const arm_compute::Coordinates & id)
+ arm_compute::execute_window_loop(window, [&](const arm_compute::Coordinates &)
{
stream.write(reinterpret_cast<const char *>(in.ptr()), sizeof(typestring_type));
},
@@ -662,7 +668,7 @@
}
catch(const std::ofstream::failure &e)
{
- ARM_COMPUTE_ERROR("Writing %s: (%s)", npy_filename.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Writing %s: (%s)", npy_filename.c_str(), e.what());
}
}
@@ -703,7 +709,7 @@
arm_compute::Iterator in(&tensor, window);
- execute_window_loop(window, [&](const Coordinates & id)
+ execute_window_loop(window, [&](const Coordinates &)
{
fs.read(reinterpret_cast<std::fstream::char_type *>(in.ptr()), tensor.info()->tensor_shape()[0] * tensor.info()->element_size());
},
@@ -714,7 +720,7 @@
}
catch(const std::ofstream::failure &e)
{
- ARM_COMPUTE_ERROR("Writing %s: (%s)", filename.c_str(), e.what());
+ ARM_COMPUTE_ERROR_VAR("Writing %s: (%s)", filename.c_str(), e.what());
}
}
@@ -737,7 +743,7 @@
{
std::uniform_real_distribution<float> dist(lower_bound, upper_bound);
- execute_window_loop(window, [&](const Coordinates & id)
+ execute_window_loop(window, [&](const Coordinates &)
{
*reinterpret_cast<half *>(it.ptr()) = (half)dist(gen);
},
@@ -749,7 +755,7 @@
{
std::uniform_real_distribution<float> dist(lower_bound, upper_bound);
- execute_window_loop(window, [&](const Coordinates & id)
+ execute_window_loop(window, [&](const Coordinates &)
{
*reinterpret_cast<float *>(it.ptr()) = dist(gen);
},
@@ -801,7 +807,7 @@
Iterator itensor1(&tensor1, window);
Iterator itensor2(&tensor2, window);
- execute_window_loop(window, [&](const Coordinates & id)
+ execute_window_loop(window, [&](const Coordinates &)
{
if(std::abs(*reinterpret_cast<T *>(itensor1.ptr()) - *reinterpret_cast<T *>(itensor2.ptr())) > tolerance)
{