Results 1 to 2 of 2

Thread: deafult memory value?

  1. #1
    Junior Member
    Join Date
    Feb 2014

    deafult memory value?

    when we create a buffer object using clCreateBuffer(), what is the default value of the memory elements?
    i ran sample test and I got zero every time. So I am confused that I am getting this ok or this is some garbage value value and its all zero by coincidence.

  2. #2
    Senior Member
    Join Date
    Dec 2011
    I don't recall anything in the specification saying memory will be initialized so I would not rely on the behavior you are seeing; it might change with a driver or OS update, or on other hardware. Note than OpenCL 1.2 added buffer and image initialization functions (I think they are clEnqueueFillBuffer/Image).

Tags for this Thread

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