MCPcopy Create free account
hub / github.com/alicevision/AliceVision / writeFloat3Map

Function writeFloat3Map

src/aliceVision/depthMap_sycl/depthMapUtils.cpp:124–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void writeFloat3Map(int rc,
125 const mvsUtils::MultiViewParams& mp,
126 const mvsUtils::TileParams& tileParams,
127 const ROI& roi,
128 const SyclDeviceMemoryPitched<sycl::float3, 2>& in_map_dmp,
129 sycl::queue& queue,
130 const mvsUtils::EFileType fileType,
131 int scale,
132 int step,
133 const std::string& name)
134{
135 const ROI downscaledROI = downscaleROI(roi, scale * step);
136 const int width = int(downscaledROI.width());
137 const int height = int(downscaledROI.height());
138
139 // copy map from device pitched memory to host memory
140 SyclHostMemoryHeap<sycl::float3, 2> map_hmh(in_map_dmp.getSize(), queue);
141 map_hmh.copyFrom(in_map_dmp, queue, sycl::event()).wait();
142
143 // copy map from host memory to an Image
144 image::Image<image::RGBfColor> map(width, height, true, {0.f, 0.f, 0.f});
145
146 map_hmh.copyTo(map);
147
148 // write map from the image buffer
149 mvsUtils::writeMap(rc, mp, fileType, tileParams, roi, map, scale, step, (name.empty()) ? "" : "_" + name);
150}
151
152void writeDeviceImage(const SyclDeviceMemoryPitched<SyclRGB, 2>& in_img_dmp, sycl::queue& queue, const std::string& path)
153{

Callers 2

writeNormalMapFunction · 0.70
writeNormalMapFilteredFunction · 0.70

Calls 8

downscaleROIFunction · 0.85
writeMapFunction · 0.50
widthMethod · 0.45
heightMethod · 0.45
getSizeMethod · 0.45
copyFromMethod · 0.45
copyToMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected