| 105 | } |
| 106 | |
| 107 | Status Upsample::BindArguments() { |
| 108 | kernel_.ResetBindingCounter(); |
| 109 | RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[0]->GetMemoryPtr())); |
| 110 | RETURN_IF_ERROR(BindArgs(&kernel_, linked_operations_)); |
| 111 | RETURN_IF_ERROR(kernel_.SetMemoryAuto(dst_[0]->GetMemoryPtr())); |
| 112 | RETURN_IF_ERROR(kernel_.SetBytesAuto(src_[0]->GetSizeWithDepth())); |
| 113 | RETURN_IF_ERROR(kernel_.SetBytesAuto(dst_[0]->GetSizeWithDepth())); |
| 114 | float2 scale_factor = |
| 115 | float2(CalculateResizeScale(src_[0]->Width(), dst_[0]->Width(), attr_), |
| 116 | CalculateResizeScale(src_[0]->Height(), dst_[0]->Height(), attr_)); |
| 117 | RETURN_IF_ERROR(kernel_.SetBytesAuto(scale_factor)); |
| 118 | return OkStatus(); |
| 119 | } |
| 120 | |
| 121 | int3 Upsample::GetGridSize() const { |
| 122 | const int grid_x = dst_[0]->Width(); |
nothing calls this directly
no test coverage detected