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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:29:05+00:00 2026-06-12T14:29:05+00:00

I am writing an image processing program and am trying to implement gpgpu and

  • 0

I am writing an image processing program and am trying to implement gpgpu and opencl using OpenCLTemplate. After working through your tutorials I have figured out how to get my code to run but i am having issues with larger images. I fixed this by separating the images into chunks and running it through my code but i want to make it so that instead of having a set amount of chunks to split into i have it determine the max amount of memory needed and split the image into however many pieces to run the code.

The problem i have run into though is that i don’t know exactly how much memory is being thrown at the gpu and how to figure it out. Below is the code i am using, is it possible to explain how the memory is being handled here or some advice as to where to look.

I’ve looked through the opencltemplate documentation to no avail and no longer know where to look.

CLCalc.Program.Compile(openCLInvert);
CLCalc.Program.Kernel kernel = new CLCalc.Program.Kernel("Filter");
CLCalc.Program.Variable CLData = new CLCalc.Program.Variable(Data);

float[] imgProcessed = new float[Data.Length];

CLCalc.Program.Variable CLFiltered = new CLCalc.Program.Variable(imgProcessed);
CLCalc.Program.Variable[] args = 
    new CLCalc.Program.Variable[] { CLData, CLFiltered };

int[] test = new int[] { imageData.Width, imageData.Height };

float size = 0;
for (int x = 0; x <= 1; x++)
{
    size += args[x].Size;
}

kernel.Execute(args, test);
CLCalc.Program.Sync();

As above shows i can find the amount of size being used as the argument but i still don’t know what the total memory usages are.

  • 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-12T14:29:06+00:00Added an answer on June 12, 2026 at 2:29 pm

    The amount of memory that is being used by your application would be the size of the Data variable plus the size of the imgProcessed variable.

    Therefore the amount of data being used by your application would therefore be:

    sizeof(float) * imgProcessed.length + sizeof(typeof(Data)) * Data.length
    

    This is because all of your data is being allocated on the device when you make calls like

    CLCalc.Program.Variable CLData = new CLCalc.Program.Variable(Data);
    

    In this case, the entire Data array is being written to your device memory.

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

Sidebar

Related Questions

I am writing a program to do some image processing. I am working with
I am writing a sort of image processing program that allows the user to
I'm writing a program about image-processing. I need to store an int square matrix
I'm writing a program that will do image processing on a 16 bit tiff
I'm working with an image processing project where I'm trying to locate features on
I'm writing a program to do some image processing on the GPU. For this
I am writing an image processing program with the express purpose to alter large
So I have been writing a lot of image processing code lately using only
I'm trying to do some image processing using C++. I'm currently using OS X
I'm writing an image processing program to perform real time processing of video frames.

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.