Shared Virtual Memory (SVM) Functions

Click an item in the table below for details about that function.

clSVMAlloc Allocates a shared virtual memory buffer
clSVMFree Frees a shared virtual memory buffer
clEnqueueSVMFree Enqueues a command to free the shared virtual memory allocated using clSVMAlloc or a shared system memory pointer
clEnqueueSVMMemcpy Enqueues a command to do a memcpy operation
clEnqueueSVMMemFill Enqueues a command to fill a region in memory with a pattern of a given pattern size
clEnqueueSVMMap Enqueues a command that will allow the host to update a region of a SVM buffer
clEnqueueSVMUnmap Enqueues a command to indicate that the host has completed updating a specified region

Description

Shared Virtual Memory (SVM) (Glossary): An address space exposed to both the host and the devices within a context. SVM causes addresses to be meaningful between the host and all of the devices within a context and therefore supports the use of pointer based data structures in OpenCL kernels. It logically extends a portion of the global memory into the host address space therefore giving work-items access to the host address space. There are three types of SVM in OpenCL Coarse-Grained buffer SVM: Sharing occurs at the granularity of regions of OpenCL buffer memory objects. Fine-Grained buffer SVM: Sharing occurs at the granularity of individual loads/stores into bytes within OpenCL buffer memory objects. Fine-Grained system SVM: Sharing occurs at the granularity of individual loads/stores into bytes occurring anywhere within the host memory.

Specification

OpenCL Specification

Copyright © 2007-2015 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.