MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / build

Method build

src/runtime/omp/omp_code_object.cpp:121–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119void *omp_sscp_executable_object::get_module() const { return _module; }
120
121result omp_sscp_executable_object::build(
122 const std::string &source, const std::vector<std::string> &kernel_names) {
123
124 if (_module != nullptr)
125 return make_success();
126
127 if (auto result = make_shared_library_from_blob(_module, source, _kernel_cache_path);
128 !result.is_success())
129 return result;
130
131 _kernel_names = kernel_names;
132 // find all kernel symbols
133 for (const auto &kernel_name : _kernel_names) {
134 std::string message;
135 if (auto kernel = (omp_sscp_kernel *)common::get_symbol_from_library(
136 _module, kernel_name, message)) {
137 _kernels.emplace(kernel_name, kernel);
138 } else {
139 if (!message.empty()) {
140 HIPSYCL_DEBUG_WARNING << "[omp_sscp_executable_object] " << message << std::endl;
141 }
142 return make_error(__acpp_here(),
143 error_info{"omp_sscp_executable_object: could not load "
144 "kernel from shared library"});
145 }
146 }
147 return make_success();
148}
149
150bool omp_sscp_executable_object::contains(
151 const std::string &backend_kernel_name) const {

Callers 1

ocl_executable_objectMethod · 0.45

Calls 7

make_successFunction · 0.85
get_symbol_from_libraryFunction · 0.85
make_errorFunction · 0.85
is_successMethod · 0.80
emplaceMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected