Skip to content

Commit 2806d7b

Browse files
committed
test without resetting TLS context and device to nullptr
1 parent 6d38b5c commit 2806d7b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

common/sys/alloc.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,12 @@ namespace embree
2424

2525
void enableUSMAllocEmbree(sycl::context* context, sycl::device* device)
2626
{
27-
if (tls_context_embree != nullptr) throw std::runtime_error("USM allocation already enabled");
28-
if (tls_device_embree != nullptr) throw std::runtime_error("USM allocation already enabled");
2927
tls_context_embree = context;
3028
tls_device_embree = device;
3129
}
3230

3331
void disableUSMAllocEmbree()
3432
{
35-
if (tls_context_embree == nullptr) throw std::runtime_error("USM allocation not enabled");
36-
if (tls_device_embree == nullptr) throw std::runtime_error("USM allocation not enabled");
37-
tls_context_embree = nullptr;
38-
tls_device_embree = nullptr;
3933
}
4034

4135
void enableUSMAllocTutorial(sycl::context* context, sycl::device* device)

0 commit comments

Comments
 (0)