Skip to content

Add support for host pointer #3

@GoogleCodeExporter

Description

@GoogleCodeExporter
We want to optionally be able to have alloc just map to an existing host 
pointer via CL_MEM_USE_HOST_PTR. This will be an optimization for OpenCL 
kernels running on the CPU or a shared memory architecture like AMD Fusion.

Basically, we should change

static cl_int alloc(size_t bytes, cl_mem* gpuBuffer);

to

static cl_int alloc(size_t bytes, cl_mem* gpuBuffer, void* hostPointer = NULL);

and add logic to set CL_MEM_USE_HOST_PTR when hostPointer is not NULL.



Original issue reported on code.google.com by rick.web...@gmail.com on 20 Dec 2010 at 9:39

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions