Skip to content

Commit

Permalink
silence warning
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfrojdh committed Feb 11, 2025
1 parent 4c750cc commit b3196e1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion include/aare/ClusterVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion python/src/cluster.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 6 additions & 1 deletion python/src/file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {


Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/geo_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b3196e1

Please sign in to comment.