| 134 | |
| 135 | template<typename T> |
| 136 | inline T getVal(size_t index) const |
| 137 | { |
| 138 | FT_LOG_DEBUG("%s start", __PRETTY_FUNCTION__); |
| 139 | FT_CHECK(where == MEMORY_CPU); |
| 140 | FT_CHECK(data != nullptr); |
| 141 | FT_CHECK_WITH_INFO(index < size(), "index is larger than buffer size"); |
| 142 | |
| 143 | if (getTensorType<T>() != type) { |
| 144 | FT_LOG_DEBUG("getVal with type %s, but data type is: %s", |
| 145 | getNumpyTypeDesc(getTensorType<T>()).c_str(), |
| 146 | getNumpyTypeDesc(type).c_str()); |
| 147 | } |
| 148 | return ((T*)data)[index]; |
| 149 | } |
| 150 | |
| 151 | template<typename T> |
| 152 | inline T getVal() const |
nothing calls this directly
no outgoing calls
no test coverage detected