[Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set v2

Jan Vesely jan.vesely at rutgers.edu
Mon Mar 23 08:59:44 PDT 2015


On Mon, 2015-03-23 at 14:52 +0000, Tom Stellard wrote:
> The storage size for local kernel args can be queried before the
> arguments are set by using the CL_KERNEL_LOCAL_MEM_SIZE param
> of clGetKernelWorkGroupInfo().
> 
> The spec says that if local kernel arguments have not been specified,
> then we should assume their size is 0.
> 
> v2:
>   - Implement using c++11 member initialization.
> ---
>  src/gallium/state_trackers/clover/core/kernel.hpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/state_trackers/clover/core/kernel.hpp b/src/gallium/state_trackers/clover/core/kernel.hpp
> index bf5998d..d6432a4 100644
> --- a/src/gallium/state_trackers/clover/core/kernel.hpp
> +++ b/src/gallium/state_trackers/clover/core/kernel.hpp
> @@ -175,7 +175,7 @@ namespace clover {
>           virtual void unbind(exec_context &ctx);
>  
>        private:
> -         size_t _storage;
> +         size_t _storage = 0;
>        };
>  
>        class constant_argument : public argument {

Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150323/2043207d/attachment.sig>


More information about the mesa-dev mailing list