Merge pull request #1019 from scchan/lazy_binding

minor workaround for lazy binding
Este commit está contenido en:
Maneesh Gupta
2019-04-16 08:36:10 +05:30
cometido por GitHub
Se han modificado 2 ficheros con 6 adiciones y 11 borrados
+1 -7
Ver fichero
@@ -10,9 +10,6 @@
using namespace std;
// DATA - STATICS
constexpr const char hip_impl::Bundled_code_header::magic_string_[];
// CREATORS
hip_impl::Bundled_code_header::Bundled_code_header(const vector<char>& x)
: Bundled_code_header{x.cbegin(), x.cend()} {}
@@ -22,12 +19,9 @@ hip_impl::Bundled_code_header::Bundled_code_header(
// hipLoadModuleData is so poorly specified (for no fault of its own).
if (!p) return;
if (!valid(*static_cast<const Bundled_code_header*>(p))) return;
auto ph = static_cast<const Header_*>(p);
if (!equal(magic_string_, magic_string_ + magic_string_sz_, ph->bundler_magic_string_)) {
return;
}
size_t sz = sizeof(Header_) + ph->bundle_cnt_ * sizeof(Bundled_code::Header);
auto pb = static_cast<const char*>(p) + sizeof(Header_);
auto n = ph->bundle_cnt_;