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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:39:28+00:00 2026-06-10T19:39:28+00:00

I have a heavy-duty algorithm in C# that takes two large Bitmap s of

  • 0

I have a heavy-duty algorithm in C# that takes two large Bitmaps of about 10000×5000 and performs photo and ray collision operations on a 3D model to map photos on the 3D model.

I would like to know if it is possible to convert such an algorithm to OpenCL to optimize parallel operations during the algorithm. But before asking you to go into the details of the algorithm, I would like to know how I can investigate if my algorithm is convertible to OpenCL.

I am not experienced in OpenCL and I would like to know if it is worth it to get into it and learn how it works. Are there things I have to look for that will definitely not work on the graphics card? (for-loops, recursion)

Update:

My algorithm goes something like:

foreach photo
    split the photo in 64x64 blocks
    foreach block
        cast a ray from the camera to the 3D model
        foreach triangle in 3D model
            perform raycheck
  • 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-06-10T19:39:29+00:00Added an answer on June 10, 2026 at 7:39 pm

    Yes, opencl is very possible for this type of work. ray casting is a place where gpu hardware can shine.

    One way to divide this up:

    foreach photo - work done by host application. (openmp?)
    foreach block - use one opencl work group per block
    foreach triangle in 3D model - single work item
    

    There are some other things to consider when you implement this algorithm.

    1) are there always 64^2 rays to be cast per block?

    2) what ratio of rays will ‘hit’ the image and/or the geometry? conditional branches will hurt performance on gpu hardware.

    3) have you considered casting from the geometry perspective, rather than the image? ie foreach triangle, foreach vertex, cast ray from camera and detect position on screen. you might be able to interpolate the remaining points on the triangle as well as z-buffer the results to prevent redrawing of the pixels.

    4) if you are only crunching graphics, does opengl/directx have what you need already?

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

Sidebar

Related Questions

I have a Java application that makes heavy use of a large file, to
I have been reading about making ajax heavy applications more search engine friendly: https://developers.google.com/webmasters/ajax-crawling/docs/getting-started
I have some code that makes heavy use of a thread pool, which I
I have a method myButtonAction which performs some heavy calculations, which I need to
I have a website that makes heavy use of AJAX. There is an almost
I have a multithreaded application that makes heavy use of OpenSSL in C. It
I have a page that has pretty heavy (mid-weight rather) canvas operations going on.
I have heavy duty real time image processing app on android and just got
Here's the deal: I have a heavy layout that cannot be improved any further,
I have noticed that some of my ajax-heavy sites (ones I visit, not ones

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.