Skip to content

Commit

Permalink
Adopt interface chance in HSAKernel. Note that nullptr is passed as the
Browse files Browse the repository at this point in the history
owning HSAExecutable for the shared-object case - if at some point
HSAKernel will start using its _executable member this will create
issues.
  • Loading branch information
AlexVlx committed Sep 14, 2017
1 parent d94d60c commit f7a4301
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions hc2/headers/functions/integer_computational_basis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,15 @@ namespace hc2
{
return x > T{0};
}

template<
typename T,
typename std::enable_if<std::is_integral<T>{}>::type* = nullptr>
inline
constexpr
bool zero(T x)
{
return x == T{0};
}

}
3 changes: 2 additions & 1 deletion lib/hsa/mcwamp_hsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,8 @@ class HSADevice final : public KalmarDevice
if (hsa_executable_symbol_get_info(
*k, HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT, &h) ==
HSA_STATUS_SUCCESS) {
kernel = new HSAKernel(str, shortName, *k, h);

kernel = new HSAKernel(str, shortName, nullptr, *k, h);
}
}
}
Expand Down

0 comments on commit f7a4301

Please sign in to comment.