clover: Store map result into a temporary vector in clCreateProgramWithBinary.
This avoids the inefficient multiple evaluation of the map result in the code below. It should cause no functional changes. Tested-by: "Dorrington, Albert" <albert.dorrington@lmco.com>
This commit is contained in:
@@ -69,7 +69,7 @@ clCreateProgramWithBinary(cl_context d_ctx, cl_uint n,
|
||||
throw error(CL_INVALID_DEVICE);
|
||||
|
||||
// Deserialize the provided binaries,
|
||||
auto result = map(
|
||||
std::vector<std::pair<cl_int, module>> result = map(
|
||||
[](const unsigned char *p, size_t l) -> std::pair<cl_int, module> {
|
||||
if (!p || !l)
|
||||
return { CL_INVALID_VALUE, {} };
|
||||
|
||||
Reference in New Issue
Block a user