Address Space Qualifier Functions

Address space qualifier functions.

global gentype * to_global ( gentype *ptr)
const global gentype * to_global ( const gentype *ptr)
local gentype * to_local ( gentype *ptr)
const local gentype * to_local ( const gentype *ptr)
private gentype * to_private ( gentype *ptr)
const private gentype * to_private ( const gentype *ptr)
cl_mem_fence_flags get_fence ( gentype *ptr)
cl_mem_fence_flags get_fence ( const gentype *ptr)

Description

to_global Returns a pointer that points to a region in the global address space if to_global can cast ptr to the global address space. Otherwise it returns NULL.

to_local Returns a pointer that points to a region in the local address space if to_local can cast ptr to the local address space. Otherwise it returns NULL.

to_private Returns a pointer that points to a region in the private address space if to_private can cast ptr to the private address space. Otherwise it returns NULL.

get_fence returns a valid memory fence value for ptr.

The generic type gentype is used to indicate the built-in data types char, uchar, short, ushort, int, uint, long, ulong, float, or double.

Specification

OpenCL Specification

Also see

qualifiers

Copyright © 2007-2013 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.