예제 #1
0
void MainWindow::createDeviceChooser()
{
    deviceAction = ui.deviceToolBar->addAction(QIcon(":/images/atmega168_icon.png"), tr("Device"));
    deviceChooser = new DeviceChooser(this);
    connect(deviceAction, SIGNAL(triggered()), this, SLOT(chooseDevice()));
    connect(deviceChooser, SIGNAL(deviceChosen(const QString &)), SLOT(setDevice(const QString &)));
}
예제 #2
0
QWidget *VideoCaptureNode::gui()
{
	QPushButton					*GUI = new QPushButton( "Select..." );

	connect( GUI, SIGNAL(released()), this, SLOT(chooseDevice()) );

	return( GUI );
}
예제 #3
0
파일: init.hpp 프로젝트: sbfnk/LibBi
// need to keep in same compilation unit as caller for bi_ode_init()
inline void bi::bi_init(const int threads) {
  bi_omp_init(threads);

  #ifdef ENABLE_CUDA
  #ifdef ENABLE_MPI
  boost::mpi::communicator world;
  int rank = world.rank();
  #else
  int rank = 0;
  #endif
  int dev = chooseDevice(rank);
  //std::cerr << "Rank " << rank << " using device " << dev << std::endl;
  cudaThreadSetCacheConfig(cudaFuncCachePreferL1);
  #endif

  bi_ode_init();
}