| 102 | } |
| 103 | |
| 104 | Status Reshape::BindArguments() { |
| 105 | kernel_.ResetBindingCounter(); |
| 106 | RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[0]->GetMemoryPtr())); |
| 107 | RETURN_IF_ERROR(BindArgs(&kernel_, linked_operations_)); |
| 108 | RETURN_IF_ERROR(kernel_.SetMemoryAuto(dst_[0]->GetMemoryPtr())); |
| 109 | RETURN_IF_ERROR(kernel_.SetBytesAuto(src_[0]->GetSizeWithDepth())); |
| 110 | RETURN_IF_ERROR(kernel_.SetBytesAuto(dst_[0]->GetSizeWithDepth())); |
| 111 | const int2 plane_size = int2(src_[0]->Width() * src_[0]->Channels(), |
| 112 | dst_[0]->Width() * dst_[0]->Channels()); |
| 113 | RETURN_IF_ERROR(kernel_.SetBytesAuto(plane_size)); |
| 114 | |
| 115 | return OkStatus(); |
| 116 | } |
| 117 | |
| 118 | int3 Reshape::GetGridSize() const { |
| 119 | const int grid_x = dst_[0]->Width(); |
nothing calls this directly
no test coverage detected