Home
last modified time | relevance | path

Searched refs:fromDim (Results 1 – 2 of 2) sorted by relevance

/frameworks/ml/nn/common/include/
DCpuOperationUtils.h122 const auto& fromDim = nchwShape.dimensions; in convertNchwToNhwc() local
123 nhwcShape->dimensions = {fromDim[0], fromDim[2], fromDim[3], fromDim[1]}; in convertNchwToNhwc()
126 uint32_t spatialSize = fromDim[2] * fromDim[3]; in convertNchwToNhwc()
127 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertNchwToNhwc()
129 for (uint32_t c = 0; c < fromDim[1]; c++) { in convertNchwToNhwc()
130 uint32_t fromIndex = n * fromDim[1] * spatialSize + c * spatialSize + hw; in convertNchwToNhwc()
142 const auto& fromDim = nhwcShape.dimensions; in convertNhwcToNchw() local
144 uint32_t spatialSize = fromDim[1] * fromDim[2]; in convertNhwcToNchw()
145 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertNhwcToNchw()
146 for (uint32_t c = 0; c < fromDim[3]; c++) { in convertNhwcToNchw()
[all …]
/frameworks/ml/nn/common/
DCpuExecutor.cpp488 inline bool convertToNhwcImpl(T* to, const T* from, const std::vector<uint32_t>& fromDim) { in convertToNhwcImpl() argument
489 uint32_t spatialSize = fromDim[2] * fromDim[3]; in convertToNhwcImpl()
490 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertToNhwcImpl()
492 for (uint32_t c = 0; c < fromDim[1]; c++) { in convertToNhwcImpl()
493 uint32_t fromIndex = n * fromDim[1] * spatialSize + c * spatialSize + hw; in convertToNhwcImpl()
502 inline bool convertFromNhwcImpl(T* to, const T* from, const std::vector<uint32_t>& fromDim) { in convertFromNhwcImpl() argument
503 uint32_t spatialSize = fromDim[1] * fromDim[2]; in convertFromNhwcImpl()
504 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertFromNhwcImpl()
505 for (uint32_t c = 0; c < fromDim[3]; c++) { in convertFromNhwcImpl()
507 uint32_t fromIndex = n * spatialSize * fromDim[3] + hw * fromDim[3] + c; in convertFromNhwcImpl()
[all …]