I want to use a string matching in managedCuda. But how can I initialized it?
i've tried using C# version, here's the examples:
stringAr = new List<string>();
stringAr.Add("you");
stringAr.Add("your");
stringAr.Add("he");
stringAr.Add("she");
stringAr.Add("shes");
for the string matching, i've used this code:
bool found = false;
for (int i = 0; i < stringAr.Count; i++)
{
found = (stringAr[i]).IndexOf(textBox2.Text) > -1;
if (found) break;
}
if (found && textBox2.Text != "")
{
label1.Text = "Found!";
}
else
{
label1.Text = "Not Found!";
}
I also allocate input h_A in host memory
string[] h_B = new string[N];
When i want to allocate in device memory and copy vectors from host memory to device memory
CudaDeviceVariable<string[]> d_B = h_B;
It gave me this error
The type 'string[]' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'CudaDeviceVariable<T>'
any help?