Results 1 to 2 of 2

Thread: openCl Multiple context ! is it possible ?

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    10

    openCl Multiple context ! is it possible ?

    Hi again !

    in my openCl i am using only one context for one device using
    clCreateContext ()
    , but my question is can i use multiple context or one device in the same application , if yes ! where i should use multiple context and when i should one context

    and thank you .

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: openCl Multiple context ! is it possible ?

    but my question is can i use multiple context or one device in the same application , if yes ! where i should use multiple context and when i should one context
    Yes, you can create multiple contexts for the same device on the same application. Typically it has no benefit; I recommend always using a single context.

    The reason it is allowed to have multiple contexts is because, for example, the programmer that is writing an application may use OpenCL for certain operations. This application may also use some third-party library that also happens to use OpenCL internally to accelerate some algorithms. If we didn't allow the same process to create multiple OpenCL contexts then this sort of scenario wouldn't work.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. Replies: 1
    Last Post: 08-20-2010, 11:19 AM
  2. Replies: 2
    Last Post: 04-26-2010, 08:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •