MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / BindArguments

Method BindArguments

tensorflow/lite/delegates/gpu/cl/kernels/apply_mask.cc:106–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106Status ApplyMask::BindArguments() {
107 kernel_.ResetBindingCounter();
108 RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[0]->GetMemoryPtr()));
109 RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[1]->GetMemoryPtr()));
110 RETURN_IF_ERROR(kernel_.SetMemoryAuto(dst_[0]->GetMemoryPtr()));
111 RETURN_IF_ERROR(BindArgs(&kernel_, linked_operations_));
112 RETURN_IF_ERROR(kernel_.SetBytesAuto(int32_t(
113 GetMaskType(src_[0]->GetSizeWithDepth(), src_[1]->GetSizeWithDepth()))));
114 RETURN_IF_ERROR(kernel_.SetBytesAuto(src_[0]->GetSizeWithDepth()));
115 RETURN_IF_ERROR(kernel_.SetBytesAuto(src_[1]->GetSizeWithDepth()));
116 RETURN_IF_ERROR(kernel_.SetBytesAuto(dst_[0]->GetSizeWithDepth()));
117 return OkStatus();
118}
119
120int3 ApplyMask::GetGridSize() const {
121 return int3(dst_[0]->Width(), dst_[0]->Height(), dst_[0]->Depth());

Callers

nothing calls this directly

Calls 8

BindArgsFunction · 0.85
GetMaskTypeFunction · 0.85
OkStatusFunction · 0.85
ResetBindingCounterMethod · 0.80
SetMemoryAutoMethod · 0.80
GetSizeWithDepthMethod · 0.80
GetMemoryPtrMethod · 0.45
SetBytesAutoMethod · 0.45

Tested by

no test coverage detected