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_internal_check(FLA_Obj alpha,FLA_Obj A,FLA_Obj B,fla_axpy_t * cntl)13 FLA_Error FLA_Axpy_internal_check( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpy_t* cntl )
14 {
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 // Verify that the object element types are identical.
22 e_val = FLA_Check_identical_object_elemtype( A, B );
23 FLA_Check_error_code( e_val );
24
25 // Verify conformality between all the objects. This check works regardless
26 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27 // element length and width are used instead of scalar length and width.
28 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
29 FLA_Check_error_code( e_val );
30
31 return FLA_SUCCESS;
32 }
33
34