Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterTh committed Dec 31, 2023
1 parent a8d5f69 commit a99837b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/simsycl/sycl/property.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ class property_list {
requires(is_property_v<Properties> && ...)
property_list(Properties... props) : m_properties{props...} {}

// Implemented by hipSYCL and DPC++ although the spec does not mention any members beside the constructor
// Provided as per 4.5.4.1
template<typename Property>
bool has_property() const noexcept {
return std::any_of(m_properties.begin(), m_properties.end(),
[](const std::any &prop) { return prop.type() == typeid(Property); });
}

// Implemented by hipSYCL and DPC++ although the spec does not mention any members beside the constructor
// Provided as per 4.5.4.1
template<typename Property>
Property get_property() const {
const auto iter = std::find_if(m_properties.begin(), m_properties.end(),
Expand Down
2 changes: 1 addition & 1 deletion test/math_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TEST_CASE("Length function works as expected", "[math][geometric]") {
#if SIMSYCL_FEATURE_HALF_TYPE
using sycl::half;
half h = 7.0f;
vec<half, 2> vh1 = vec<half, 2>(3.0f, 4.0f);
auto vh1 = vec<half, 2>(half(3.0), half(4.0));
CHECK(length(h) == Catch::Approx(7.0f));
CHECK(length(vh1) == Catch::Approx(5.0f));
CHECK(length(vh1.yx()) == Catch::Approx(5.0f));
Expand Down

0 comments on commit a99837b

Please sign in to comment.