MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / next_index

Method next_index

src/tests/buffer.h:409–423  ·  view source on GitHub ↗

/

Source from the content-addressed store, hash-verified

407
408 /*****************************************************/
409 size_t next_index( const size_t x, const size_t y=0, const size_t z=0, const size_t batch=0)
410 {
411 if( x+1 < length(dimx))
412 return index( x+1, y, z, batch );
413 else if( y+1 < length(dimy) )
414 return index( 0, y+1, z, batch );
415 else if( z+1 < length(dimz) )
416 return index( 0, 0, z+1, batch );
417 else if( batch+1 < batch_size() )
418 return index( 0, 0, 0, batch+1 );
419 else
420 // we are at the last point
421 // return the location immediately after the last point
422 return index( 0, 0, 0, batch+1 );
423 }
424
425 /*****************************************************/
426 bool points_are_about_equal( buffer<T> & other_buffer, size_t x, size_t y, size_t z, size_t batch )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected