Results 1 to 2 of 2

Thread: Questions on multi-core applications

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    2

    Questions on multi-core applications

    Standard format the tutorials teach me is

    C[i] = a[i] + b[i];

    what if I don't want an array

    what if I want something akin to

    sumTotal = x + rnd();

    ran on multiple cores?

    Is that possible?

  2. #2
    Junior Member
    Join Date
    Oct 2012
    Posts
    2

    Re: Questions on multi-core applications

    Since I don't know how to edit my post (can't find the button), I'll explain how I have my code setup on multiple threads.

    I have a threadStructure that is an array, 1 per thread.

    this threadStructure has a member variable named "runningTotal"

    each runningTotal is summed together after x number of runs per each thread.

    so, I guess I could use an array, but rather than C[i], I would use threadStructure[i].runningTotal =...

    but I don't know if that's what I want. As each runningTotal is ran through a loop to achieve

    runningTotal = x + rnd();

Similar Threads

  1. Replies: 3
    Last Post: 06-24-2012, 07:01 AM
  2. Looking for multi-GPU applications
    By Amnon in forum OpenCL
    Replies: 5
    Last Post: 04-12-2011, 03:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •