Skip to content

Commit

Permalink
Clang-format deepExamples.cpp and fix a comment typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
pleprince authored and Philippe Leprince committed Jan 11, 2024
1 parent 85330ee commit ffee862
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/examples/deepExamples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ readDeepScanlineFile (
// - allocate memory for the pixels
// - describe the layout of the A, and Z pixel buffers
// - read the sample counts from the file
// - allocate the memory requred to store the samples
// - allocate the memory required to store the samples
// - read the pixels from the file
//

Expand All @@ -69,15 +69,17 @@ readDeepScanlineFile (

frameBuffer.insertSampleCountSlice (Slice (
UINT,
(char*) (&sampleCount[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&sampleCount[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (unsigned int) * 1, // xStride
sizeof (unsigned int) * width)); // yStride

frameBuffer.insert (
"dataZ",
DeepSlice (
FLOAT,
(char*) (&dataZ[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataZ[0][0] - dataWindow.min.x -
dataWindow.min.y * width),

sizeof (float*) * 1, // xStride for pointer array
sizeof (float*) * width, // yStride for pointer array
Expand All @@ -87,7 +89,8 @@ readDeepScanlineFile (
"dataA",
DeepSlice (
HALF,
(char*) (&dataA[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataA[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (half*) * 1, // xStride for pointer array
sizeof (half*) * width, // yStride for pointer array
sizeof (half) * 1)); // stride for O data sample
Expand Down Expand Up @@ -176,7 +179,8 @@ writeDeepScanlineFile (

frameBuffer.insertSampleCountSlice (Slice (
UINT,
(char*) (&sampleCount[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&sampleCount[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (unsigned int) * 1, // xS

sizeof (unsigned int) * width)); // yStride
Expand All @@ -185,7 +189,8 @@ writeDeepScanlineFile (
"Z",
DeepSlice (
FLOAT,
(char*) (&dataZ[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataZ[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (float*) * 1, // xStride for pointer

sizeof (float*) * width, // yStride for pointer array
Expand All @@ -195,7 +200,8 @@ writeDeepScanlineFile (
"A",
DeepSlice (
HALF,
(char*) (&dataA[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataA[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (half*) * 1, // xStride for pointer array
sizeof (half*) * width, // yStride for pointer array
sizeof (half) * 1)); // stride for A data sample
Expand Down

0 comments on commit ffee862

Please sign in to comment.