Hi all;
I’m trying to write a GPGPU programming for my research project. However, when I tried to perform a GPGPU programming with CUDA on Nvidia GeForce 640M, I found out that the CPU and kernel launching is not in a sequential way when i compiled and run the program. Below here is the code snapshot :
global void insert( … ) {
}
global_ void match( … ) {
}
int main () {
// launch the kernel “insert”
insert <<< 6, 8>>>(dev_pHash_, dev_pTable_Size_, dev_pWordListArray, dev_pWordListLength,
dev_pTotalWordListArray, dev_pBitMask , dev_pBF_bit_table);
// Call input function to input string for pattern matching
StringCapture();
// Call function StringMatch() to invoke kernel “match”
StringMatch();
cudaDeviceSynchronize();
:
:
}
When i run the program; i noticed that the StringCapture() function run first before the kernel named “insert” got executed.
Anyway to solve this issue ??
I’m using Visual Studio 2008 IDE and running on Windows 7 Platform.