Dear POCL developers,

My name is Lee, Ki-Ju.
I'm working on porting OpenCL using POCL 0.7
I don't know whether you are the the person, who is related with my question.
If you are not the right person, I ask for understanding on my ignorance.
If you are the person, May I ask 3 questions related with deallocation of 
objects, which are created in the POCL.

1. Cannot delete command queue object.
     : is the POCL_RELEASE_OBJECT not required in clFinish after executing 
clEnqueueNDRangeKernel function
       , which calls clRetainCommandQueue?

2. Cannot delete program.devices, When I call clCreateProgramWithBianry
    : when I use  clCreateProgramWithBinary function to create program object 
with offline compilation,
      program.devices is different with context.devices.
      if I use clCreateProgramWithSource, i don't need to consider for free of 
that object.
      Because the clReleaseContext makes free the context.devices.
      But there is no deallocation for program.devices, when I call 
clCreateProgramWithBinary.

3. Cannot delete mutex instance.
    : in case of POCL_INIT_LOCK, some buffer could be allocated for creating 
mutex(or semaphore) in some OS environment.
      I think all the instances for mutex (or semaphore) should be deleted just 
before deallocation of each object.
      Here is an example -

     #define POCL_FREE_LOCK(__LOCK__)       mutex_free (&(__LOCK__))

     #define POCL_FREE_OBJECT_NO_ICD(__OBJ__)         \
      do {                                           \
        POCL_FREE_LOCK ((__OBJ__)->pocl_lock);         \
      }

      #define POCL_FREE_OBJECT(__OBJ__)                \
          POCL_FREE_OBJECT_NO_ICD(__OBJ__)

      POname(clReleaseKernel)(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0
      {
          ~~~~
          POCL_FREE_OBJECT(kernel);
          free(kernel);
      }

If you give some answers or guidance, It should be very useful to me.
Thank you.

Regards,
Lee, Ki-Ju

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to