MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / close

Method close

src/core/impl/comp_node/cuda/comp_node.cpp:832–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830 RAIICloseFD(int fd) : m_fd(fd) {}
831 ~RAIICloseFD() { close(); }
832 void close() {
833 if (m_fd != -1) {
834 ::close(m_fd);
835 m_fd = -1;
836 }
837 }
838};
839// an implementation that does not call cuInit
840template <typename Func, typename Val>

Callers 1

call_cuda_forksafeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected