MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / makeViewportReadbackLikeImage

Function makeViewportReadbackLikeImage

tests/test_python_integration.cpp:209–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 }
208
209 std::shared_ptr<lfs::core::Tensor> makeViewportReadbackLikeImage() {
210 auto image = lfs::core::Tensor::zeros(
211 {size_t{3}, size_t{2}, size_t{2}},
212 lfs::core::Device::CPU,
213 lfs::core::DataType::Float32);
214 auto* const ptr = image.ptr<float>();
215 constexpr size_t width = 2;
216 constexpr size_t height = 2;
217
218 // Simulate raw bottom-left-origin readback: the logical bottom row is bright.
219 for (size_t col = 0; col < width; ++col) {
220 ptr[0 * height * width + col * height + 0] = 10.0f;
221 }
222
223 return std::make_shared<lfs::core::Tensor>(std::move(image));
224 }
225
226 bool containsLichtfeldModule(const std::filesystem::path& dir) {
227 std::error_code ec;

Callers 1

TEST_FFunction · 0.85

Calls 1

moveFunction · 0.85

Tested by

no test coverage detected