MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / GetFloat4FromPyArray

Function GetFloat4FromPyArray

python/common/PyUtil.cpp:139–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137namespace cvcudapy {
138
139float4 GetFloat4FromPyArray(const pyarray &array)
140{
141 if (array.ndim() == 0)
142 {
143 return nvcv::cuda::SetAll<float4>(*array.data());
144 }
145 else
146 {
147 float4 value = nvcv::cuda::SetAll<float4>(0.f);
148
149 for (int i = 0; i < static_cast<int>(array.size()); i++)
150 {
151 nvcv::cuda::GetElement(value, i) = *array.data(i);
152 }
153
154 return value;
155 }
156}
157
158} // namespace cvcudapy

Callers 4

WarpPerspectiveIntoFunction · 0.85
RemapIntoFunction · 0.85
VarShapeRemapIntoFunction · 0.85
WarpAffineIntoFunction · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

WarpPerspectiveIntoFunction · 0.68