Mesa (master): clover: Store map result into a temporary vector in clCreateProgramWithBinary.
Francisco Jerez
currojerez at kemper.freedesktop.org
Wed Jan 15 15:52:51 UTC 2014
Module: Mesa
Branch: master
Commit: efcc84f425f26905e0c6627993108e5927bd81b3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=efcc84f425f26905e0c6627993108e5927bd81b3
Author: Francisco Jerez <currojerez at riseup.net>
Date: Tue Jan 14 21:47:46 2014 +0100
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 at lmco.com>
---
src/gallium/state_trackers/clover/api/program.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp
index 7d060c4..6049209 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, {} };
More information about the mesa-commit
mailing list