Searched refs:fromDim (Results 1 – 2 of 2) sorted by relevance
104 const auto& fromDim = nchwShape.dimensions; in convertNchwToNhwc() local105 nhwcShape->dimensions = {fromDim[0], fromDim[2], fromDim[3], fromDim[1]}; in convertNchwToNhwc()108 uint32_t spatialSize = fromDim[2] * fromDim[3]; in convertNchwToNhwc()109 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertNchwToNhwc()111 for (uint32_t c = 0; c < fromDim[1]; c++) { in convertNchwToNhwc()112 uint32_t fromIndex = n * fromDim[1] * spatialSize + c * spatialSize + hw; in convertNchwToNhwc()124 const auto& fromDim = nhwcShape.dimensions; in convertNhwcToNchw() local126 uint32_t spatialSize = fromDim[1] * fromDim[2]; in convertNhwcToNchw()127 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertNhwcToNchw()128 for (uint32_t c = 0; c < fromDim[3]; c++) { in convertNhwcToNchw()[all …]
423 inline bool convertToNhwcImpl(T* to, const T* from, const std::vector<uint32_t>& fromDim) { in convertToNhwcImpl() argument424 uint32_t spatialSize = fromDim[2] * fromDim[3]; in convertToNhwcImpl()425 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertToNhwcImpl()427 for (uint32_t c = 0; c < fromDim[1]; c++) { in convertToNhwcImpl()428 uint32_t fromIndex = n * fromDim[1] * spatialSize + c * spatialSize + hw; in convertToNhwcImpl()437 inline bool convertFromNhwcImpl(T* to, const T* from, const std::vector<uint32_t>& fromDim) { in convertFromNhwcImpl() argument438 uint32_t spatialSize = fromDim[1] * fromDim[2]; in convertFromNhwcImpl()439 for (uint32_t n = 0; n < fromDim[0]; n++) { in convertFromNhwcImpl()440 for (uint32_t c = 0; c < fromDim[3]; c++) { in convertFromNhwcImpl()442 uint32_t fromIndex = n * spatialSize * fromDim[3] + hw * fromDim[3] + c; in convertFromNhwcImpl()[all …]