3 Replies Latest reply on Aug 10, 2011 9:03 AM by genaganna

    a parameter in clEnqueueNDRangeKernel

    haibo031031

      Hi, there is a parameter in function ' clEnqueueNDRangeKernel', called 'global_work_offset'. Can anybody explain it to me, please? (I have read the specifications, but still feel confused). It's better to give me an example or something like that.

      Many thanks.

        • a parameter in clEnqueueNDRangeKernel
          genaganna

           

          Originally posted by: haibo031031 Hi, there is a parameter in function ' clEnqueueNDRangeKernel', called 'global_work_offset'. Can anybody explain it to me, please? (I have read the specifications, but still feel confused). It's better to give me an example or something like that.

           

          Many thanks.

           



          Suppose you have two 1D array of 100 elements and you want to add only last 50 elements.

          just specifing offset as 50 will add all last 50 element by element.

           

            • a parameter in clEnqueueNDRangeKernel
              haibo031031

               

              Originally posted by: genaganna
              Originally posted by: haibo031031 Hi, there is a parameter in function ' clEnqueueNDRangeKernel', called 'global_work_offset'. Can anybody explain it to me, please? (I have read the specifications, but still feel confused). It's better to give me an example or something like that.  


              Many thanks.  


               

               

               

              Suppose you have two 1D array of 100 elements and you want to add only last 50 elements.

               

              just specifing offset as 50 will add all last 50 element by element.

               

               

               

              Thanks for your reply. That is : there are 100 elements, and we use 100 work-items to process them. When I want to all the last 50 elements, just specify offset as 50. At this moment, the total number of work-items/threads is still 100 or 50?

                • a parameter in clEnqueueNDRangeKernel
                  genaganna

                   

                  Originally posted by: haibo031031  

                   

                  Thanks for your reply. That is : there are 100 elements, and we use 100 work-items to process them. When I want to all the last 50 elements, just specify offset as 50. At this moment, the total number of work-items/threads is still 100 or 50?

                   

                  Total number threads/work-items are 50 which is equivalent to (global_work_items - offset).