Results 1 to 2 of 2

Thread: data partitioning?

  1. #1

    data partitioning?

    I have this problem :
    I have a sequence of float and i must find all the pair next values that differ of more than a delta.
    I do this for separating some tokens in a sequence of float.
    Each token that differs more than a delta to the next must be separed.

    my principal problems that i'm not understand in opencl (Because in opencl there aren't containers)are these:

    1)I don't know how many tokens are in the sequence , then how i can set all the sequences in a out buffers ? and how many big must be the out buffer?
    2)if I have some values that aren't sequential how i can create a buffer that is sequential?I must use prefix sum?how?
    for ex:

    if i have
    values: 1 0 0 2 3
    indexes: 1 2 3 4 5

    how i can create this sequence :

    values: 1 2 3 0 0
    indexes: 1 2 3 4 5


  2. #2
    Senior Member
    Join Date
    Oct 2012

    Re: data partitioning?

    If you really want the sequnce you wrote down there, you just have to sort your value array. Look for some sort algorithms for openCL. If you want to trach the changes made by the sort algorithm (change the index values in another array) you have to extend the sortingalgorithm a bit.

    After sorting you could iterate the array and check each delta. for that, you could use arraysize-1 threads that check its own element to its neigbour

Similar Threads

  1. texturing from alpha data to RGBA data
    By neha.bhende in forum OpenGL ES
    Replies: 0
    Last Post: 05-14-2012, 05:50 AM
  2. inconsistent data
    By mustang in forum OpenCL
    Replies: 2
    Last Post: 03-02-2012, 04:16 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
Proudly hosted by Digital Ocean