packages/CudaUtils/test/tstHardware.cc
// Make sure we can acquire the device for real
Make sure we can acquire the device for real
Make sure we can acquire the device for real
TEST(Initialize, acquire)
{
    typedef cuda::arch::Device     Arch_t;
    typedef cuda::Hardware<Arch_t> Hardware_t;
    if (!Hardware_t::valid_device_exists())
    {
        SKIP_TEST("CUDA is not installed but no valid GPU exists.");
    }
    ASSERT_FALSE(Hardware_t::have_acquired());
    Hardware_t::acquire();
    ASSERT_TRUE(Hardware_t::have_acquired());
}
TEST ( Initialize , acquire ) { typedef cuda :: arch :: Device Arch_t ; typedef cuda :: Hardware < Arch_t > Hardware_t ; if ( ! Hardware_t :: valid_device_exists ( ) ) { SKIP_TEST ( " " ) ; } ASSERT_FALSE ( Hardware_t :: have_acquired ( ) ) ; Hardware_t :: acquire ( ) ; ASSERT_TRUE ( Hardware_t :: have_acquired ( ) ) ; }
Make sure we can acquire the device for real
Make sure we can acquire the device for real