MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / verifyTypeSupport

Function verifyTypeSupport

src/backend/cuda/Array.cpp:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43template<typename T>
44void 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
54template<typename T>
55std::shared_ptr<BufferNode<T>> bufferNodePtr() {

Callers

nothing calls this directly

Calls 3

isDoubleSupportedFunction · 0.70
getActiveDeviceIdFunction · 0.70
isHalfSupportedFunction · 0.70

Tested by

no test coverage detected