Fills each of the minor-dim matrices with a number designating which minor dim matrix is enclosed by the shape.
| 155 | // Fills each of the minor-dim matrices with a number designating which minor |
| 156 | // dim matrix is enclosed by the shape. |
| 157 | void FillWithMinorDimNum() { |
| 158 | LOG(INFO) << "width: " << this->width(); |
| 159 | LOG(INFO) << "height: " << this->height(); |
| 160 | LOG(INFO) << "depth: " << this->depth(); |
| 161 | LOG(INFO) << "planes: " << this->planes(); |
| 162 | for (int64 height = 0; height < this->height(); ++height) { |
| 163 | for (int64 width = 0; width < this->width(); ++width) { |
| 164 | for (int64 plane = 0; plane < planes(); ++plane) { |
| 165 | for (int64 depth = 0; depth < this->depth(); ++depth) { |
| 166 | float this_val = plane * this->depth() + depth; |
| 167 | (*this)(plane, depth, height, width) = this_val; |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | }; |
| 174 | |
| 175 | } // namespace xla |