String Manipulations and Text Processing

I am new to the CUDA environment and currently have a Tesla C1060. I am also using the .NET Framework SDK with the CUDA.NET framework 2.3.7. I want to do some complex string operations in parallel which we have done with Grid Computing, and wanted to see how we could do it on a GPU if possible.

Problem is I only see the char type and there doesn’t seem to be much about string manipulations on the forums. Specifically, we have large amounts of text we need to format and process which is computationally intensive, which is why I think this would make a good GPU application. This text is a combination of HTML loaded from a dataset from a relational database.

I haven’t really see much on the forums with regards to back end text processing with GPU’s, guess it currently isn’t used that much on the web side?

Any response to at least a point in the right direction would be greatly appreciated!

External Image

Actually I just figured out you have to convert the string to bytes, so I have 2 functions that I can use, now it will be interesting to see what I can do with the byte arrays, I am probably just added and removing elements to the byte array so I am guessing this is the only way to concatenate strings? This code is in c# and I am using the CUDA.NET library from http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx

// C# to convert a string to a byte array.

    public static byte[] StrToByteArray(string str)

    {

        System.Text.UnicodeEncoding encoding = new System.Text.UnicodeEncoding();

        return encoding.GetBytes(str);

    }

CUDA cuda = new CUDA(0, true);

byte bValues = StrToByteArray(“

Harry Yeh
”);

CUdeviceptr svalues = cuda.CopyHostToDevice(bValues);

// C# to convert a byte array to a string.

        byte[] dBytes = bValues;

        string str;

        System.Text.UnicodeEncoding enc = new System.Text.UnicodeEncoding();

        str = enc.GetString(dBytes);