File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 99#include < cstdint>
1010#include < cstring>
1111#include < mutex>
12+ #include < stdexcept>
1213#include < unordered_map>
1314#include < vector>
1415
@@ -1125,19 +1126,22 @@ CuLinkHandle create_culink_handle_ref(CUlinkState state) {
11251126// ============================================================================
11261127
11271128FileDescriptorHandle create_fd_handle (int fd) {
1129+ #ifdef _WIN32
1130+ throw std::runtime_error (" create_fd_handle is not supported on Windows" );
1131+ #else
11281132 return FileDescriptorHandle (
11291133 new int (fd),
1130- [](const int * p) {
1131- #ifndef _WIN32
1132- ::close (*p);
1133- #endif
1134- delete p;
1135- }
1134+ [](const int * p) { ::close (*p); delete p; }
11361135 );
1136+ #endif
11371137}
11381138
11391139FileDescriptorHandle create_fd_handle_ref (int fd) {
1140+ #ifdef _WIN32
1141+ throw std::runtime_error (" create_fd_handle_ref is not supported on Windows" );
1142+ #else
11401143 return std::make_shared<const int >(fd);
1144+ #endif
11411145}
11421146
11431147} // namespace cuda_core
You can’t perform that action at this time.
0 commit comments