Skip to content

Commit

Permalink
Merge pull request #272 from clEsperanto/fix-histogram-bug-uint8
Browse files Browse the repository at this point in the history
fix uint8 type in histogram
  • Loading branch information
StRigaud committed Mar 29, 2024
2 parents bc11103 + 9dd0743 commit 6091872
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clic/src/tier3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ histogram_func(const Device::Pointer & device,
float min,
float max) -> Array::Pointer
{
tier0::create_vector(src, dst, nbins);
tier0::create_vector(src, dst, nbins, dType::UINT64);
size_t number_of_partial_histograms = src->height();
auto partial_hist =
Array::create(nbins, 1, number_of_partial_histograms, 3, dType::UINT32, src->mtype(), src->device());
Array::create(nbins, 1, number_of_partial_histograms, 3, dType::UINT64, src->mtype(), src->device());
if (std::isnan(max) || std::isnan(max))
{
min = tier2::minimum_of_all_pixels_func(device, src);
Expand Down
2 changes: 1 addition & 1 deletion tests/tier3/test_histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TestHistogram : public ::testing::TestWithParam<std::string>
protected:
std::array<float, 10 * 5 * 3> input;
std::array<float, 10> valid;
std::array<float, 10> output;
std::array<uint64_t, 10> output;

virtual void
SetUp()
Expand Down

0 comments on commit 6091872

Please sign in to comment.