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 &))); }
QWidget *VideoCaptureNode::gui() { QPushButton *GUI = new QPushButton( "Select..." ); connect( GUI, SIGNAL(released()), this, SLOT(chooseDevice()) ); return( GUI ); }
// 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(); }