| 42 | |
| 43 | template<typename T> |
| 44 | void verifyTypeSupport() { |
| 45 | if ((std::is_same<T, double>::value || std::is_same<T, cdouble>::value) && |
| 46 | !isDoubleSupported(getActiveDeviceId())) { |
| 47 | AF_ERROR("Double precision not supported", AF_ERR_NO_DBL); |
| 48 | } else if (std::is_same<T, common::half>::value && |
| 49 | !isHalfSupported(getActiveDeviceId())) { |
| 50 | AF_ERROR("Half precision not supported", AF_ERR_NO_HALF); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | template<typename T> |
| 55 | std::shared_ptr<BufferNode<T>> bufferNodePtr() { |
nothing calls this directly
no test coverage detected