Ratification Status

Ratified

Extension and Version Dependencies

None

Other Extension Metadata

Last Modified Date

2020-04-21

IP Status

No known IP claims.

Description

cl_khr_initialize_memory adds OpenCL C support for initializing local and private memory before a kernel begins execution. This is accomplished by specifying a flag at context creation time affecting all such memory.

Memory is allocated in various forms in OpenCL both explicitly (global memory) or implicitly (local, private memory). This allocation so far does not provide a straightforward mechanism to initialize the memory on allocation. In other words what is lacking is the equivalent of calloc for the currently supported malloc like capability. This functionality is useful for a variety of reasons including ease of debugging, application controlled limiting of visibility to previous contents of memory and in some cases, optimization.

See the Initializing Memory section of the OpenCL C specification for more information.

New Enums

  • cl_context_properties

    • CL_CONTEXT_MEMORY_INITIALIZE_KHR

  • cl_context_memory_initialize_khr

    • CL_CONTEXT_MEMORY_INITIALIZE_LOCAL_KHR

    • CL_CONTEXT_MEMORY_INITIALIZE_PRIVATE_KHR

Version History

  • Revision 1.0.0, 2020-04-21

    • First assigned version.

See Also

No cross-references are available

Document Notes

For more information, see the OpenCL Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Copyright 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0