File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ static bool save_image(
8787 info_header.bi_size_image_ = static_cast <uint32_t >(rowLength * height);
8888 os.write (reinterpret_cast <const char *>(&info_header), sizeof (info_header));
8989
90- for (int y = 0 ; y < height; y++) {
91- for (int x = 0 ; x < width; x++) {
90+ for (uint32_t y = 0 ; y < height; y++) {
91+ for (uint32_t x = 0 ; x < width; x++) {
9292 const uint32_t * ppix = ptr + (height - 1 - y) * width + x;
9393 os.write (reinterpret_cast <const char *>(ppix), 4 );
9494 }
@@ -128,8 +128,8 @@ static bool save_image(
128128 info_header.bi_size_image_ = static_cast <uint32_t >(rowLength * height);
129129 os.write (reinterpret_cast <const char *>(&info_header), sizeof (info_header));
130130
131- for (int y = 0 ; y < height; y++) {
132- for (int x = 0 ; x < width; x++) {
131+ for (uint32_t y = 0 ; y < height; y++) {
132+ for (uint32_t x = 0 ; x < width; x++) {
133133 const uint8_t * ppix = ptr + (height - 1 - y) * width + x;
134134 os.write (reinterpret_cast <const char *>(ppix), 1 );
135135 os.write (reinterpret_cast <const char *>(ppix), 1 );
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ static bool save_image(
8787 info_header.bi_size_image_ = static_cast <uint32_t >(rowLength * height);
8888 os.write (reinterpret_cast <const char *>(&info_header), sizeof (info_header));
8989
90- for (int y = 0 ; y < height; y++) {
91- for (int x = 0 ; x < width; x++) {
90+ for (uint32_t y = 0 ; y < height; y++) {
91+ for (uint32_t x = 0 ; x < width; x++) {
9292 const uint32_t * ppix = ptr + (height - 1 - y) * width + x;
9393 os.write (reinterpret_cast <const char *>(ppix), 4 );
9494 }
@@ -128,8 +128,8 @@ static bool save_image(
128128 info_header.bi_size_image_ = static_cast <uint32_t >(rowLength * height);
129129 os.write (reinterpret_cast <const char *>(&info_header), sizeof (info_header));
130130
131- for (int y = 0 ; y < height; y++) {
132- for (int x = 0 ; x < width; x++) {
131+ for (uint32_t y = 0 ; y < height; y++) {
132+ for (uint32_t x = 0 ; x < width; x++) {
133133 const uint8_t * ppix = ptr + (height - 1 - y) * width + x;
134134 os.write (reinterpret_cast <const char *>(ppix), 1 );
135135 os.write (reinterpret_cast <const char *>(ppix), 1 );
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ int main(
164164 commandQueue.finish ();
165165
166166 auto start = std::chrono::system_clock::now ();
167- for ( int i = 0 ; i < iterations; i++ )
167+ for ( size_t i = 0 ; i < iterations; i++ )
168168 {
169169 commandQueue.enqueueNDRangeKernel (
170170 kernel,
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ static bool save_image(
8787 info_header.bi_size_image_ = static_cast <uint32_t >(rowLength * height);
8888 os.write (reinterpret_cast <const char *>(&info_header), sizeof (info_header));
8989
90- for (int y = 0 ; y < height; y++) {
91- for (int x = 0 ; x < width; x++) {
90+ for (uint32_t y = 0 ; y < height; y++) {
91+ for (uint32_t x = 0 ; x < width; x++) {
9292 const uint32_t * ppix = ptr + (height - 1 - y) * width + x;
9393 os.write (reinterpret_cast <const char *>(ppix), 4 );
9494 }
@@ -128,8 +128,8 @@ static bool save_image(
128128 info_header.bi_size_image_ = static_cast <uint32_t >(rowLength * height);
129129 os.write (reinterpret_cast <const char *>(&info_header), sizeof (info_header));
130130
131- for (int y = 0 ; y < height; y++) {
132- for (int x = 0 ; x < width; x++) {
131+ for (uint32_t y = 0 ; y < height; y++) {
132+ for (uint32_t x = 0 ; x < width; x++) {
133133 const uint8_t * ppix = ptr + (height - 1 - y) * width + x;
134134 os.write (reinterpret_cast <const char *>(ppix), 1 );
135135 os.write (reinterpret_cast <const char *>(ppix), 1 );
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ static void go()
130130 commandQueue.finish ();
131131
132132 auto start = std::chrono::system_clock::now ();
133- for ( int i = 0 ; i < iterations; i++ )
133+ for ( size_t i = 0 ; i < iterations; i++ )
134134 {
135135 commandQueue.enqueueNDRangeKernel (
136136 kernel,
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ static void go()
130130 commandQueue.finish ();
131131
132132 auto start = std::chrono::system_clock::now ();
133- for ( int i = 0 ; i < iterations; i++ )
133+ for ( size_t i = 0 ; i < iterations; i++ )
134134 {
135135 commandQueue.enqueueNDRangeKernel (
136136 kernel,
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ static void go()
130130 commandQueue.finish ();
131131
132132 auto start = std::chrono::system_clock::now ();
133- for ( int i = 0 ; i < iterations; i++ )
133+ for ( size_t i = 0 ; i < iterations; i++ )
134134 {
135135 commandQueue.enqueueNDRangeKernel (
136136 kernel,
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ static void go()
126126 commandQueue.finish ();
127127
128128 auto start = std::chrono::system_clock::now ();
129- for ( int i = 0 ; i < iterations; i++ )
129+ for ( size_t i = 0 ; i < iterations; i++ )
130130 {
131131 commandQueue.enqueueNDRangeKernel (
132132 kernel,
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ static void go()
126126 commandQueue.finish ();
127127
128128 auto start = std::chrono::system_clock::now ();
129- for ( int i = 0 ; i < iterations; i++ )
129+ for ( size_t i = 0 ; i < iterations; i++ )
130130 {
131131 commandQueue.enqueueNDRangeKernel (
132132 kernel,
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ static void go()
130130 commandQueue.finish ();
131131
132132 auto start = std::chrono::system_clock::now ();
133- for ( int i = 0 ; i < iterations; i++ )
133+ for ( size_t i = 0 ; i < iterations; i++ )
134134 {
135135 commandQueue.enqueueNDRangeKernel (
136136 kernel,
You can’t perform that action at this time.
0 commit comments