1 /*
2 
3     Copyright (C) 2014, The University of Texas at Austin
4 
5     This file is part of libflame and is available under the 3-Clause
6     BSD license, which can be found in the LICENSE file at the top-level
7     directory, or at http://opensource.org/licenses/BSD-3-Clause
8 
9 */
10 
11 #include "FLAME.h"
12 
FLA_Axpyt_n(FLA_Obj alpha,FLA_Obj A,FLA_Obj B,fla_axpyt_t * cntl)13 FLA_Error FLA_Axpyt_n( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t* cntl )
14 {
15 	FLA_Error r_val = FLA_SUCCESS;
16 
17 	if      ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
18 	{
19 		r_val = FLA_Axpyt_n_task( alpha, A, B, cntl );
20 	}
21 	else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
22 	{
23 		r_val = FLA_Axpyt_n_blk_var1( alpha, A, B, cntl );
24 	}
25 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
26 	else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
27 	{
28 		r_val = FLA_Axpyt_n_blk_var2( alpha, A, B, cntl );
29 	}
30 #endif
31 	else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 )
32 	{
33 		r_val = FLA_Axpyt_n_blk_var3( alpha, A, B, cntl );
34 	}
35 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
36 	else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 )
37 	{
38 		r_val = FLA_Axpyt_n_blk_var4( alpha, A, B, cntl );
39 	}
40 #endif
41 	else
42 	{
43 		r_val = FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
44 	}
45 
46 	return r_val;
47 }
48 
49