Exemplo n.º 1
0
GIL_FORCEINLINE void tbb_copy_pixels( const View1& src, const View2& dst)
{ 
    assert(src.dimensions()==dst.dimensions());
    tbb::parallel_for( tbb::blocked_range<std::size_t>( 0, src.height()),
                        detail::make_tbb_copy_pixels_fun( src, dst),
                        GIL_TBB_ALGORITHMS_DEFAULT_PARTITIONER());
}
Exemplo n.º 2
0
GIL_FORCEINLINE void tbb_transform3_pixels( const View1& src1, const View2& src2,
                                            const View3& src3, const View4& dst, Fun f)
{
    tbb::parallel_for( tbb::blocked_range<std::size_t>( 0, src1.height()), 
                        detail::make_tbb_transform3_pixels_fun( src1, src2, src3, dst, f),
                        GIL_TBB_ALGORITHMS_DEFAULT_PARTITIONER());
}
Exemplo n.º 3
0
GIL_FORCEINLINE
F transform_pixels_progress( const View1& src, const View2& dst, const F& fun, IProgress& p )
{
	assert( src.dimensions() == dst.dimensions() );
	for( std::ptrdiff_t y = 0; y < src.height(); ++y )
	{
		typename View1::x_iterator srcIt = src.row_begin( y );
		typename View2::x_iterator dstIt = dst.row_begin( y );
		for( std::ptrdiff_t x = 0; x < src.width(); ++x )
			dstIt[x] = fun( srcIt[x] );
		if( p.progressForward( dst.width() ) )
			return fun;
	}
	return fun;
}