Esempio n. 1
0
siz_t bli_thread_get_range_weighted_b2t
     (
       thrinfo_t* thr,
       obj_t*     a,
       blksz_t*   bmult,
       dim_t*     start,
       dim_t*     end
     )
{
	siz_t area;

	// This function assigns area-weighted ranges in the m dimension
	// where the total range spans 0 to m-1 with 0 at the bottom end and
	// m-1 at the top end.

	if ( bli_obj_intersects_diag( *a ) &&
	     bli_obj_is_upper_or_lower( *a ) )
	{
		doff_t diagoff = bli_obj_diag_offset( *a );
		uplo_t uplo    = bli_obj_uplo( *a );
		dim_t  m       = bli_obj_length( *a );
		dim_t  n       = bli_obj_width( *a );
		dim_t  bf      = bli_blksz_get_def_for_obj( a, bmult );

		// Support implicit transposition.
		if ( bli_obj_has_trans( *a ) )
		{
			bli_reflect_about_diag( diagoff, uplo, m, n );
		}

		bli_reflect_about_diag( diagoff, uplo, m, n );

		bli_rotate180_trapezoid( diagoff, uplo );

		area = bli_thread_get_range_weighted_sub
		(
		  thr, diagoff, uplo, m, n, bf,
		  TRUE, start, end
		);
	}
	else // if dense or zeros
	{
		area = bli_thread_get_range_b2t
		(
		  thr, a, bmult,
		  start, end
		);
	}

	return area;
}
Esempio n. 2
0
siz_t bli_thread_get_range_b2t
     (
       thrinfo_t* thr,
       obj_t*     a,
       blksz_t*   bmult,
       dim_t*     start,
       dim_t*     end
     )
{
	dim_t m  = bli_obj_length_after_trans( *a );
	dim_t n  = bli_obj_width_after_trans( *a );
	dim_t bf = bli_blksz_get_def_for_obj( a, bmult );

	bli_thread_get_range( thr, m, bf,
	                      TRUE, start, end );

	return n * ( *end - *start );
}
Esempio n. 3
0
siz_t bli_thread_get_range_l2r
     (
       thrinfo_t* thr,
       obj_t*     a,
       blksz_t*   bmult,
       dim_t*     start,
       dim_t*     end
     )
{
	dim_t m  = bli_obj_length_after_trans( *a );
	dim_t n  = bli_obj_width_after_trans( *a );
	dim_t bf = bli_blksz_get_def_for_obj( a, bmult );

	bli_thread_get_range_sub( thr, n, bf,
	                          FALSE, start, end );

	return m * ( *end - *start );
}