Commit efcc84f4 authored by Francisco Jerez's avatar Francisco Jerez
Browse files

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: default avatar"Dorrington, Albert" <>
parent 83db4a30
......@@ -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, {} };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment