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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:14:44+00:00 2026-05-23T22:14:44+00:00

I am new to OpenCL. I have worked with OpenCL kernel with 1-D data.

  • 0

I am new to OpenCL. I have worked with OpenCL kernel with 1-D data. But when I tried to pass a 3-D pointer, it fails to build the kernel. To be specific I’m getting CL_BUILD_PROGRAM_FAILURE. Here’s the pseudo code for the kernel I’m trying to build –

__kernel void 3D_Test(__global float ***array)
{

x = get_global_id(0);
y = get_global_id(1);
z = get_global_id(2);

array[x][y][z] = 10.0;

}

Could anyone give me an idea on what’s wrong with the code? Thanks in advance!

  • 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-23T22:14:46+00:00Added an answer on May 23, 2026 at 10:14 pm

    That’s not valid OpenCL C (that’s why it doesn’t compile), for a 3D array, you will have to use a linearlized version of that array, just create a normal array of appropiate size (sizeX * sizeY * sizeZ) and index it this way:

    int index = x + y * sizeX + z * sizeX * sizeY;
    

    Other option is to use a 3D image with clCreateImage3D

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

Sidebar

Related Questions

I'm new to OpenGL. I have written a programm before getting to know OpenGL
I'm really new to OpenGL but have quite a good grasp of basic trigonometry
I have two years of experience on iPhone programming but totally new to OpenGL.
new to IOS OpenGL programming. I have worked through a few tutorials that talk
I have a pointer to a COLORREF buffer, something like: COLORREF* buf = new
As I'm new to OpenGL programming, I have tried to test the sample code
New to both Ruby and Rails but I'm book educated by now (which apparently
New to WCF, but familiar with COM+ - can I wrap a WCF service
I am new to OpenGL programming.I have made a rotating cube with different images
I am new to OpenCV and I have only Tiny C compiler configured on

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.