| 153 | } |
| 154 | |
| 155 | Status StridedSlice::BindArguments() { |
| 156 | kernel_.ResetBindingCounter(); |
| 157 | RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[0]->GetMemoryPtr())); |
| 158 | RETURN_IF_ERROR(BindArgs(&kernel_, linked_operations_)); |
| 159 | RETURN_IF_ERROR(kernel_.SetMemoryAuto(dst_[0]->GetMemoryPtr())); |
| 160 | int3 offset = GetOffset(attributes_, src_[0]->Width(), src_[0]->Height(), |
| 161 | src_[0]->Channels()); |
| 162 | RETURN_IF_ERROR(kernel_.SetBytesAuto(int4(offset.x, offset.y, offset.z, 1))); |
| 163 | RETURN_IF_ERROR(kernel_.SetBytesAuto(int4( |
| 164 | attributes_.strides.w, attributes_.strides.h, attributes_.strides.c, 1))); |
| 165 | RETURN_IF_ERROR(kernel_.SetBytesAuto(src_[0]->GetSizeWithDepth())); |
| 166 | RETURN_IF_ERROR(kernel_.SetBytesAuto(dst_[0]->GetSizeWithDepth())); |
| 167 | return OkStatus(); |
| 168 | } |
| 169 | |
| 170 | int3 StridedSlice::GetGridSize() const { |
| 171 | const int grid_x = dst_[0]->Width(); |
nothing calls this directly
no test coverage detected