TEST(RegisterVar, Reregister) { /* Try to register a symbol twice. */ __cudaRegisterVar(__cudaFatCubinHandle, (char*)&c, (char*)"c", "c", 0, 4, 1, 0); __cudaRegisterVar(__cudaFatCubinHandle, (char*)&c, (char*)"c", "c", 0, 4, 1, 0); }
TEST(RegisterVarDeathTest, RegisterFromNullHandle) { ::testing::FLAGS_gtest_death_test_style = "threadsafe"; EXPECT_EXIT( __cudaRegisterVar(NULL, (char*)&a, (char*)"a", "a", 0, 4, 0, 0), ::testing::KilledBySignal(SIGSEGV), ""); }
TEST(RegisterVar, RegisterNegative) { /* Try to register a symbol with negative size. */ __cudaRegisterVar(__cudaFatCubinHandle, (char*)&b, (char*)"b", "b", 0, -4, 0, 0); cudaError_t ret; size_t size; ret = cudaGetSymbolSize(&size, (char*)&b); EXPECT_EQ(cudaSuccess, ret); EXPECT_EQ(sizeof(b), size); }
TEST(RegisterVar, Register) { /* Try to register a symbol. */ __cudaRegisterVar(__cudaFatCubinHandle, (char*)&a, (char*)"a", "a", 0, 4, 0, 0); }
void WINAPI wine_cudaRegisterVar( void **fatCubinHandle, char *hostVar, char *deviceAddress, const char *deviceName, int ext, int size, int constant, int global ) { WINE_TRACE("\n"); return __cudaRegisterVar( fatCubinHandle, hostVar, deviceAddress, deviceName, ext, size, constant, global ); }