Results 1 to 2 of 2

Thread: Allocate __private memory inside a kernel

  1. #1
    Junior Member
    Join Date
    Nov 2011

    Allocate __private memory inside a kernel


    I need to do something like this inside a kernel:
    Code :
    __private mytype* next_item = (mytype*)malloc(sizeof(mytype));
    However, I'm getting this error out of the clGetProgramBuildInfo call:
    Code :
    kernel referenced an external function malloc, that could not be found.
    (interestingly, I only get this on my MacBook Pro, but not my newer iMac, which gives me a frustratingly blank error log...)

    Do I need to use a special on-chip memory allocation system? If so, where is this documented? googling "opencl malloc" doesn't give you too many useful results.



  2. #2
    Junior Member
    Join Date
    Nov 2011

    Re: Allocate __private memory inside a kernel

    apologies, I was under the impression that you could use __private memory on-device within one processing unit.

    I shall duly rewrite my kernel code to stop it using any kind of dynamic array :/

Similar Threads

  1. Replies: 4
    Last Post: 08-06-2012, 01:18 AM
  2. Can i allocate memory inside kernel?
    By luizdrumond in forum OpenCL
    Replies: 5
    Last Post: 02-22-2011, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean