summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2014-01-14 21:47:46 +0100
committerFrancisco Jerez <[email protected]>2014-01-15 16:45:05 +0100
commitefcc84f425f26905e0c6627993108e5927bd81b3 (patch)
tree668ff0a796f756e4ac208784810c6424bf2408e7 /src
parent83db4a30b84215d105a0a53353cb4d3a4e1aacb1 (diff)
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" <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/clover/api/program.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp
index 7d060c44aa1..6049209b6a0 100644
--- a/src/gallium/state_trackers/clover/api/program.cpp
+++ b/src/gallium/state_trackers/clover/api/program.cpp
@@ -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, {} };