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 4083642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:20:19+00:00 2026-05-20T18:20:19+00:00

My algorithm consists from two steps: Data generation. On this step I generate data

  • 0

My algorithm consists from two steps:

  1. Data generation. On this step I generate data array in cycle as some function result
  2. Data processing. For this step I written OpenCL kernel which process data array generated on previous step.

Now first step runs on CPU because it hard to parallelize. I want to run it on GPU because each step of generation takes some time. And I want to run second step for already generated data immediately.

Can I run another opencl kernel from currently runned kernel in separated thread? Or it be run in the some thread that caller kernel?

Some pseudocode for illustrate my point:

__kernel second(__global int * data, int index) {
    //work on data[i]. This process takes a lot of time
}

__kernel first(__global int * data, const int length) {
    for (int i = 0; i < length; i++) {
        // generate data and store it in data[i]

        // This kernel will be launched in some thread that caller or in new thread?
        // If in same thread, there are ways to launch it in separated thread?
        second(data, i);
    }
}
  • 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-20T18:20:20+00:00Added an answer on May 20, 2026 at 6:20 pm

    No, OpenCL has no concept of threads, and neither a kernel execution can launch another kernel. All kernel execution is triggered by the CPU.

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

Sidebar

Related Questions

Which algorithm does the JavaScript Array#sort() function use? I understand that it can take
Suppose you have an application that consists of two layers: A: A data layer
Algorithm to generate all possible letter combinations of given string down to 2 letters
What algorithm would you suggest to identify how much from 0 to 1 (float)
The algorithm name is after some mathematician. You can traverse image line by line
I want to get the maximum values from two images, while preserving other information.
There are two data types: tasks and actions. An action costs a certain time
I have written an algorithm which iteratively solves the problem. The first iteration consists
Since some time, I'm using an algorithm that runs in complexity O(V + E)
Im working with a flex application that pulls data from a java class file

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.