Skip to content

Instantly share code, notes, and snippets.

@kashif
Created September 4, 2009 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kashif/180971 to your computer and use it in GitHub Desktop.
Save kashif/180971 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <cutil_inline.h>
#include <mathlink.h>
///////////////////////////////////////////////////////////////////////////////
// Main program
///////////////////////////////////////////////////////////////////////////////
int main(int argc, char **argv)
{
// use command-line specified CUDA device, otherwise use device with highest Gflops/s
if( cutCheckCmdLineFlag(argc, (const char**)argv, "device") )
cutilDeviceInit(argc, argv);
else
cudaSetDevice( cutGetMaxGflopsDeviceId() );
return MLMain(argc, argv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment