mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-04-22 06:40:03 +02:00
Fix minor warnings (#126)
- Unused variables - signed vs. unsigned - added -flto=auto
This commit is contained in:
parent
4c750cc3be
commit
d86cb533c8
@ -244,6 +244,7 @@ target_compile_options(
|
||||
-Wvla
|
||||
-Wdouble-promotion
|
||||
-Werror=return-type #important can cause segfault in optimzed builds
|
||||
-flto=auto
|
||||
)
|
||||
|
||||
endif() #GCC/Clang specific
|
||||
|
@ -163,7 +163,6 @@ template <typename T, typename CoordType = int16_t> class ClusterVector {
|
||||
throw std::runtime_error(
|
||||
"Only 3x3 clusters are supported for the 2x2 sum.");
|
||||
}
|
||||
const size_t n_pixels = m_cluster_size_x * m_cluster_size_y;
|
||||
std::byte *ptr = m_data + 2 * sizeof(CoordType); // skip x and y
|
||||
|
||||
for (size_t i = 0; i < m_size; i++) {
|
||||
|
@ -153,7 +153,7 @@ void define_cluster_finder_bindings(py::module &m) {
|
||||
[](ClusterFinder<uint16_t, pd_type> &self,
|
||||
py::array_t<uint16_t> frame, uint64_t frame_number) {
|
||||
auto view = make_view_2d(frame);
|
||||
self.find_clusters(view);
|
||||
self.find_clusters(view, frame_number);
|
||||
return;
|
||||
},
|
||||
py::arg(), py::arg("frame_number") = 0);
|
||||
|
@ -20,6 +20,11 @@
|
||||
namespace py = pybind11;
|
||||
using namespace ::aare;
|
||||
|
||||
//Disable warnings for unused parameters, as we ignore some
|
||||
//in the __exit__ method
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
void define_file_io_bindings(py::module &m) {
|
||||
|
||||
|
||||
@ -238,7 +243,7 @@ void define_file_io_bindings(py::module &m) {
|
||||
return image;
|
||||
});
|
||||
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
// py::class_<ClusterHeader>(m, "ClusterHeader")
|
||||
// .def(py::init<>())
|
||||
// .def_readwrite("frame_number", &ClusterHeader::frame_number)
|
||||
|
@ -22,8 +22,8 @@ uint16_t adc_sar_05_decode64to16(uint64_t input){
|
||||
}
|
||||
|
||||
void adc_sar_05_decode64to16(NDView<uint64_t, 2> input, NDView<uint16_t,2> output){
|
||||
for(size_t i = 0; i < input.shape(0); i++){
|
||||
for(size_t j = 0; j < input.shape(1); j++){
|
||||
for(int64_t i = 0; i < input.shape(0); i++){
|
||||
for(int64_t j = 0; j < input.shape(1); j++){
|
||||
output(i,j) = adc_sar_05_decode64to16(input(i,j));
|
||||
}
|
||||
}
|
||||
|
@ -13,9 +13,9 @@ DetectorGeometry update_geometry_with_roi(DetectorGeometry geo, aare::ROI roi) {
|
||||
#endif
|
||||
int pos_y = 0;
|
||||
int pos_y_increment = 0;
|
||||
for (size_t row = 0; row < geo.modules_y; row++) {
|
||||
for (int row = 0; row < geo.modules_y; row++) {
|
||||
int pos_x = 0;
|
||||
for (size_t col = 0; col < geo.modules_x; col++) {
|
||||
for (int col = 0; col < geo.modules_x; col++) {
|
||||
auto &m = geo.module_pixel_0[row * geo.modules_x + col];
|
||||
auto original_height = m.height;
|
||||
auto original_width = m.width;
|
||||
|
Loading…
x
Reference in New Issue
Block a user