コード例 #1
0
int main(int argc, char *argv[])
   {
   time_timer();
#ifdef USE_CUDA
   cuda::cudaInitialize(std::cout);
   cuda::cudaQueryDevices(std::cout);
   time_kernelcalls();
   test_useofclasses();
   test_sizes();
#else
   failwith("CUDA support not enabled on this system");
#endif
   return 0;
   }
コード例 #2
0
ファイル: tsctl.c プロジェクト: sabrown256/pactnew
int main(int c, char **v)
   {int i, nd, ni, nt, rv;

    rv = TRUE;
    nd = 100;
    ni = 1000;
    nt = 4;

    for (i = 1; i < c; i++)
        {if (strcmp(v[i], "-nd") == 0)
	    nd = SC_stoi(v[++i]);
         else if (strcmp(v[i], "-ni") == 0)
	    ni = SC_stoi(v[++i]);
         else if (strcmp(v[i], "-nt") == 0)
	    nt = SC_stoi(v[++i]);
         else if (strcmp(v[i], "-h") == 0)
	    {help();
	     return(1);};};

#ifndef OpenMP_OVER_SCHED
    {int ncpu;

     ncpu = SC_get_ncpu();
     nt   = min(nt, ncpu);};
#endif

    SC_zero_space_n(1, -2);

    SC_init_threads(nt, NULL);

/*    SC_gs.mm_debug = 1; */
/*    SC_use_c_mm(); */
/*    SC_configure_mm(0, 0, 0, 1.5); */
/*    SC_configure_mm(128, 1048576, 1048576, 1.5); */

    rv &= test_omp(nt, nd, ni);
    rv &= time_thread_lock(nt, nd, ni);
    rv &= time_timer(nt, ni);

    rv = (rv == FALSE);

    return(0);}