Skip to content

Commit

Permalink
Merge pull request #279 from clEsperanto/patch-0.9.1
Browse files Browse the repository at this point in the history
Patch-0.9.1
  • Loading branch information
StRigaud committed Apr 5, 2024
2 parents c55fb5e + 52f9ef9 commit f17d5d4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20)

project(CLIc VERSION 0.8.2)
project(CLIc VERSION 0.9.1)

set(BUILD_CUDA_BACKEND ON CACHE BOOL "Build CUDA backend")
set(BUILD_OPENCL_BACKEND ON CACHE BOOL "Build OpenCL backend")
Expand Down
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, dType::UINT64);
tier0::create_vector(src, dst, nbins, dType::UINT32);
size_t number_of_partial_histograms = src->height();
auto partial_hist =
Array::create(nbins, 1, number_of_partial_histograms, 3, dType::UINT64, src->mtype(), src->device());
Array::create(nbins, 1, number_of_partial_histograms, 3, dType::UINT32, 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/tier1/test_exponential.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TEST_P(TestExponential, execute)
gpu_output->read(output.data());
for (int i = 0; i < output.size(); i++)
{
EXPECT_EQ(output[i], valid[i]);
EXPECT_NEAR(output[i], valid[i], 0.0001);
}
}

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<uint64_t, 10> output;
std::array<uint32_t, 10> output;

virtual void
SetUp()
Expand Down
4 changes: 2 additions & 2 deletions tests/tier5/test_connected_components_labeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TEST_P(TestLabeling, executeBox)
auto device = cle::BackendManager::getInstance().getBackend().getDevice("", "all");
device->setWaitToFinish(true);

auto gpu_input = cle::Array::create(5, 3, 2, 3, cle::dType::FLOAT, cle::mType::BUFFER, device);
auto gpu_input = cle::Array::create(5, 3, 2, 3, cle::dType::UINT32, cle::mType::BUFFER, device);
gpu_input->write(input.data());

auto gpu_output = cle::tier5::connected_components_labeling_func(device, gpu_input, nullptr, "box");
Expand All @@ -41,7 +41,7 @@ TEST_P(TestLabeling, executeDiamond)
auto device = cle::BackendManager::getInstance().getBackend().getDevice("", "all");
device->setWaitToFinish(true);

auto gpu_input = cle::Array::create(5, 3, 2, 3, cle::dType::FLOAT, cle::mType::BUFFER, device);
auto gpu_input = cle::Array::create(5, 3, 2, 3, cle::dType::UINT32, cle::mType::BUFFER, device);
gpu_input->write(input.data());

auto gpu_output = cle::tier5::connected_components_labeling_func(device, gpu_input, nullptr, "diamond");
Expand Down

0 comments on commit f17d5d4

Please sign in to comment.