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_Axpy_check(FLA_Obj alpha,FLA_Obj A,FLA_Obj B)13 FLA_Error FLA_Axpy_check( FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
14 {
15   FLA_Error e_val;
16 
17   e_val = FLA_Check_floating_object( A );
18   FLA_Check_error_code( e_val );
19 
20   e_val = FLA_Check_nonconstant_object( A );
21   FLA_Check_error_code( e_val );
22 
23   e_val = FLA_Check_identical_object_datatype( A, B );
24   FLA_Check_error_code( e_val );
25 
26   e_val = FLA_Check_consistent_object_datatype( A, alpha );
27   FLA_Check_error_code( e_val );
28 
29   if ( FLA_Obj_is_vector( A ) && FLA_Obj_is_vector( B ) )
30   {
31     e_val = FLA_Check_equal_vector_dims( A, B );
32     FLA_Check_error_code( e_val );
33   }
34   else
35   {
36     e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
37     FLA_Check_error_code( e_val );
38   }
39 
40   return FLA_SUCCESS;
41 }
42 
43