no just a plain old texture, you can use an FBO to render to, that way you don't have to have any output.
A 1 dimensional array could work but it's far easier to just cram it into a 2048x2048 texture, that way you have packets in one dimension and the data in one, what works best depends on exactly your algorithm, but that is something you have to find out for yourself.
Another thing to try could be either Cuda or openCL as they are more adept to this kind of work.
Ya.I know about Cuda and openCL. I would like to try them if my budget is allowed. =.=
However, my only choice is to use openGL.
Back to topic-->
In short, I create a 2048x2048 textures. I initialize all the textures values = 1. After that, I pass the data into the texture accordingly. Send the texture into buffer.Those with value = 1 definitely is not my data so that I can recognize it.
I process the texture line by line in parallel. Those line with pattern found I change the value to 0. After that, I map out the whole texture to CPU and read it again. Then, I would know which data has pattern matched.
So that is the program flow I expect. However, I not sure what kind of function and concept should be used.
May be I try to use texture buffer object?However, how I manipulate the value of texture that had sent into the buffer object in shader program?
Eg:
I have this texture --> texture[2048]2048] = {...};
In CPU, I jz use if else and loop to search for pattern. After I send tis into the buffer, how I program the shader ? How I use the texture value again since I have to compare the value of the texture.
Eg:
for(int i = 0;i<2048;i++){
for(int j=0;j<2048;j++){
if( texture
[j] = 12)
//do sth;
}
}
How i perform this task in the shader program since I cannot use texture[j] anymore. I really get mad with this....