Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3315570
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:21:56+00:00 2026-05-17T22:21:56+00:00

i am using atom_inc in one of my kernels. More or less like this:

  • 0

i am using atom_inc in one of my kernels. More or less like this:

kernel exampleKernel(
  global volatile int * x, 
  global const int   maxX,
  global const int * buf1, 
  global const int * buf2
  )
{
  if(x < maxX)
  {
    int y = atom_inc(x);
    buf2[y] = buf1[get_global_id(0)];
  }
}

But it gives me an CL_OUT_OF_RESOURCES error when i call it.
Replacing atom_inc(x) with 0 resolves this problem … but makes the kernel useless.

Any ideas what can cause that error?

Edit: i have included these extensions in the program:

#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable
#pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable

Edit2: actually i initialize x with:

kernel.setArgs(0,0);

Do i have to use a memory object in this place?

Kind Regards,
Florian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:21:57+00:00Added an answer on May 17, 2026 at 10:21 pm

    Ah … ok … it looks like you have to use memory objects in this case.

    The solution here was to create a one element OpenCL buffer and set it as the first argument.

    I’ll leave this question and answer here so that others might not make the same fault.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I can create an Global Atom using GlobalAddAtom and I can find that atom
By using this feed http://www.google.co.in/trends/hottrends/atom/hourly we can get current trends in google. But am
I am using Symfony MVC to build a website. One of my model classes
I'm using the AtomFeedHelper and everything is working fine except for one feed where
I'm using a oneway modifier in one of my Thrift function definitions: ... oneway
Many Android Devices will be using Atom processor in future. This means that when
I'm using Zend_Feed_Atom to get a feed from a website but I'm receiving this
I'm currently stuck with using Atom CPU desktop for my Android app development. What
I've got an atom feed in my application that's build using atom_feed , and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.