| 169 | // TODO(akulik): find better place for functions below. |
| 170 | |
| 171 | inline uint3 GetPHWC4Size(const BHWC& shape) { |
| 172 | uint3 size; |
| 173 | size.x = shape.w; |
| 174 | size.y = shape.h; |
| 175 | size.z = shape.b * IntegralDivideRoundUp(shape.c, 4); |
| 176 | return size; |
| 177 | } |
| 178 | |
| 179 | inline Object MakePHWC4Ref(uint32_t global_id, const BHWC& shape) { |
| 180 | return MakeObjectRef(global_id, GetPHWC4Size(shape), AccessType::READ_WRITE); |
no test coverage detected