Exemplo n.º 1
0
void
add_plane_stats( engine::registry &r )
{
	using namespace engine;

	r.add( op( "p.sum", sum_plane, op::threaded ) );
	r.add( op( "p.sum_area_table", base::choose_runtime( compute_SAT, { { base::cpu::simd_feature::SSE3, sse3::compute_SAT } } ), op::threaded ) );
	r.add( op( "p.histogram", compute_histogram, op::threaded ) );

	// methods using the summed area table
	r.add( op( "p.local_mean_sat", base::choose_runtime( compute_mean_sat ), n_scanline_plane_adapter<false, decltype(compute_mean_sat)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.local_variance_sat", base::choose_runtime( compute_variance_sat ), n_scanline_plane_adapter<false, decltype(compute_variance_sat)>(), dispatch_scan_processing, op::n_to_one ) );

	r.add( op( "p.local_mean", base::choose_runtime( compute_mean ), n_scanline_plane_adapter<false, decltype(compute_mean)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.local_variance", base::choose_runtime( compute_variance ), n_scanline_plane_adapter<false, decltype(compute_variance)>(), dispatch_scan_processing, op::n_to_one ) );

	r.add( op( "p.mean_square_error", base::choose_runtime( compute_mse ), n_scanline_plane_adapter<false, decltype(compute_mse)>(), dispatch_scan_processing, op::n_to_one ) );
}
Exemplo n.º 2
0
void add_convolve( engine::registry &r )
{
	using namespace engine;

	r.add( op( "p.igrad_h", base::choose_runtime( horiz_igrad ), scanline_plane_adapter<false, decltype(horiz_igrad)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.igrad_v", base::choose_runtime( vert_igrad ), n_scanline_plane_adapter<false, decltype(vert_igrad)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.cgrad_h", base::choose_runtime( horiz_cgrad ), scanline_plane_adapter<false, decltype(horiz_cgrad)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.cgrad_v", base::choose_runtime( vert_cgrad ), n_scanline_plane_adapter<false, decltype(vert_cgrad)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.ngrad_h5", base::choose_runtime( horiz_ngrad5 ), scanline_plane_adapter<false, decltype(horiz_ngrad5)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.ngrad_v5", base::choose_runtime( vert_ngrad5 ), n_scanline_plane_adapter<false, decltype(vert_ngrad5)>(), dispatch_scan_processing, op::n_to_one ) );

	r.add( op( "p.igrad_h_alpha", base::choose_runtime( horiz_igrad_alpha ), scanline_plane_adapter<false, decltype(horiz_igrad_alpha)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.igrad_v_alpha", base::choose_runtime( vert_igrad_alpha ), n_scanline_plane_adapter<false, decltype(vert_igrad_alpha)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.cgrad_h_alpha", base::choose_runtime( horiz_cgrad_alpha ), scanline_plane_adapter<false, decltype(horiz_cgrad_alpha)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.cgrad_v_alpha", base::choose_runtime( vert_cgrad_alpha ), n_scanline_plane_adapter<false, decltype(vert_cgrad_alpha)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.ngrad_h5_alpha", base::choose_runtime( horiz_ngrad5_alpha ), scanline_plane_adapter<false, decltype(horiz_ngrad5_alpha)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.ngrad_v5_alpha", base::choose_runtime( vert_ngrad5_alpha ), n_scanline_plane_adapter<false, decltype(vert_ngrad5_alpha)>(), dispatch_scan_processing, op::n_to_one ) );

	r.add( op( "p.sep_conv3_mirror_h", base::choose_runtime( horiz_convolve3_mirror ), scanline_plane_adapter<false, decltype(horiz_convolve3_mirror)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.sep_conv3_h", base::choose_runtime( horiz_convolve3 ), scanline_plane_adapter<false, decltype(horiz_convolve3)>(), dispatch_scan_processing, op::one_to_one ) );
	r.add( op( "p.sep_conv_h", base::choose_runtime( horiz_convolve ), scanline_plane_adapter<false, decltype(horiz_convolve)>(), dispatch_scan_processing, op::one_to_one ) );

	r.add( op( "p.sep_conv3_mirror_v", base::choose_runtime( vert_convolve3_mirror ), n_scanline_plane_adapter<false, decltype(vert_convolve3_mirror)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.sep_conv3_v", base::choose_runtime( vert_convolve3 ), n_scanline_plane_adapter<false, decltype(vert_convolve3)>(), dispatch_scan_processing, op::n_to_one ) );
	r.add( op( "p.sep_conv_v", base::choose_runtime( vert_convolve ), n_scanline_plane_adapter<false, decltype(vert_convolve)>(), dispatch_scan_processing, op::n_to_one ) );
}