libflame
revision_anchor
|
00001 /* 00002 libflame 00003 An object-based infrastructure for developing high-performance 00004 dense linear algebra libraries. 00005 00006 Copyright (C) 2011, The University of Texas 00007 00008 libflame is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU Lesser General Public License as 00010 published by the Free Software Foundation; either version 2.1 of 00011 the License, or (at your option) any later version. 00012 00013 libflame is distributed in the hope that it will be useful, but 00014 WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with libflame; if you did not receive a copy, see 00020 http://www.gnu.org/licenses/. 00021 00022 For more information, please contact us at flame@cs.utexas.edu or 00023 send mail to: 00024 00025 Field G. Van Zee and/or 00026 Robert A. van de Geijn 00027 The University of Texas at Austin 00028 Department of Computer Sciences 00029 1 University Station C0500 00030 Austin TX 78712 00031 */ 00032 00033 // ----------------------------------------------------------------------------- 00034 00035 FLA_Error FLASH_Obj_blocksizes_check( FLA_Obj H, dim_t* b_m, dim_t* b_n ); 00036 00037 FLA_Error FLASH_Obj_create_helper_check( FLA_Bool without_buffer, FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00038 FLA_Error FLASH_Obj_create_hierarchy_check( FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* elem_sizes_m, dim_t* elem_sizes_n, FLA_Obj flat_matrix, FLA_Obj* H, unsigned long id, dim_t depth_overall, dim_t* depth_sizes_m, dim_t* depth_sizes_n, dim_t* m_offsets, dim_t* n_offsets ); 00039 00040 FLA_Error FLASH_Obj_create_conf_to_check( FLA_Trans trans, FLA_Obj H_cur, FLA_Obj* H_new ); 00041 00042 FLA_Error FLASH_Obj_create_hier_conf_to_flat_check( FLA_Trans trans, FLA_Obj F, dim_t depth, dim_t* b_mn, FLA_Obj* H ); 00043 FLA_Error FLASH_Obj_create_hier_conf_to_flat_ext_check( FLA_Trans trans, FLA_Obj F, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00044 FLA_Error FLASH_Obj_create_flat_conf_to_hier_check( FLA_Trans trans, FLA_Obj H, FLA_Obj* F ); 00045 FLA_Error FLASH_Obj_create_hier_copy_of_flat_check( FLA_Obj F, dim_t depth, dim_t* b_mn, FLA_Obj* H ); 00046 FLA_Error FLASH_Obj_create_hier_copy_of_flat_ext_check( FLA_Obj F, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00047 FLA_Error FLASH_Obj_create_flat_copy_of_hier_check( FLA_Obj H, FLA_Obj* F ); 00048 00049 FLA_Error FLASH_Obj_free_check( FLA_Obj* H ); 00050 FLA_Error FLASH_Obj_free_without_buffer_check( FLA_Obj* H ); 00051 FLA_Error FLASH_Obj_free_hierarchy_check( FLA_Obj* H ); 00052 00053 FLA_Error FLASH_Obj_attach_buffer_check( void *buffer, dim_t rs, dim_t cs, FLA_Obj* H ); 00054 FLA_Error FLASH_Obj_attach_buffer_hierarchy_check( FLA_Obj F, FLA_Obj* H ); 00055 00056 // ----------------------------------------------------------------------------- 00057 00058 FLA_Error FLASH_Part_create_2x1( FLA_Obj A, FLA_Obj* AT, 00059 FLA_Obj* AB, 00060 dim_t n_rows, FLA_Side side ); 00061 FLA_Error FLASH_Part_create_1x2( FLA_Obj A, FLA_Obj* AL, FLA_Obj* AR, 00062 dim_t n_cols, FLA_Side side ); 00063 FLA_Error FLASH_Part_create_2x2( FLA_Obj A, FLA_Obj* ATL, FLA_Obj* ATR, 00064 FLA_Obj* ABL, FLA_Obj* ABR, 00065 dim_t n_rows, dim_t n_cols, FLA_Side side ); 00066 00067 FLA_Error FLASH_Part_free_2x1( FLA_Obj* AT, 00068 FLA_Obj* AB ); 00069 FLA_Error FLASH_Part_free_1x2( FLA_Obj* AL, FLA_Obj* AR ); 00070 FLA_Error FLASH_Part_free_2x2( FLA_Obj* ATL, FLA_Obj* ATR, 00071 FLA_Obj* ABL, FLA_Obj* ABR ); 00072 00073 FLA_Error FLASH_Obj_adjust_views( FLA_Bool attach_buffer, dim_t offm, dim_t offn, dim_t m, dim_t n, FLA_Obj A, FLA_Obj* S ); 00074 FLA_Error FLASH_Obj_adjust_views_hierarchy( FLA_Bool attach_buffer, dim_t offm, dim_t offn, dim_t m, dim_t n, FLA_Obj A, FLA_Obj* S ); 00075 00076 dim_t FLASH_Obj_scalar_length( FLA_Obj H ); 00077 dim_t FLASH_Obj_scalar_width( FLA_Obj H ); 00078 dim_t FLASH_Obj_scalar_min_dim( FLA_Obj H ); 00079 dim_t FLASH_Obj_scalar_max_dim( FLA_Obj H ); 00080 dim_t FLASH_Obj_scalar_vector_dim( FLA_Obj H ); 00081 dim_t FLASH_Obj_scalar_row_offset( FLA_Obj H ); 00082 dim_t FLASH_Obj_scalar_col_offset( FLA_Obj H ); 00083 dim_t FLASH_Obj_scalar_length_tl( FLA_Obj H ); 00084 dim_t FLASH_Obj_scalar_width_tl( FLA_Obj H ); 00085 dim_t FLASH_Obj_base_scalar_length( FLA_Obj H ); 00086 dim_t FLASH_Obj_base_scalar_width( FLA_Obj H ); 00087 00088 FLA_Error FLASH_Obj_show( char* header, FLA_Obj H, char* elem_format, char* footer ); 00089 FLA_Error FLASH_Obj_show_hierarchy( FLA_Obj H, dim_t i, char* elem_format ); 00090 00091 // ----------------------------------------------------------------------------- 00092 00093 FLA_Error FLASH_Axpy_buffer_to_hier( FLA_Obj alpha, dim_t m, dim_t n, void* buffer, dim_t rs, dim_t cs, dim_t i, dim_t j, FLA_Obj H ); 00094 FLA_Error FLASH_Axpy_hier_to_buffer( FLA_Obj alpha, dim_t i, dim_t j, FLA_Obj H, dim_t m, dim_t n, void* buffer, dim_t rs, dim_t cs ); 00095 FLA_Error FLASH_Axpy_flat_to_hier( FLA_Obj alpha, FLA_Obj F, dim_t i, dim_t j, FLA_Obj H ); 00096 FLA_Error FLASH_Axpy_hier_to_flat( FLA_Obj alpha, dim_t i, dim_t j, FLA_Obj H, FLA_Obj F ); 00097 00098 FLA_Error FLASH_Axpy_hierarchy( int direction, FLA_Obj alpha, FLA_Obj F, FLA_Obj* H ); 00099 00100 // ----------------------------------------------------------------------------- 00101 00102 FLA_Error FLASH_Copy_buffer_to_hier( dim_t m, dim_t n, void* buffer, dim_t rs, dim_t cs, dim_t i, dim_t j, FLA_Obj H ); 00103 FLA_Error FLASH_Copy_hier_to_buffer( dim_t i, dim_t j, FLA_Obj H, dim_t m, dim_t n, void* buffer, dim_t rs, dim_t cs ); 00104 FLA_Error FLASH_Copy_flat_to_hier( FLA_Obj F, dim_t i, dim_t j, FLA_Obj H ); 00105 FLA_Error FLASH_Copy_hier_to_flat( dim_t i, dim_t j, FLA_Obj H, FLA_Obj F ); 00106 00107 FLA_Error FLASH_Copy_hierarchy( int direction, FLA_Obj F, FLA_Obj* H ); 00108 00109 // ----------------------------------------------------------------------------- 00110 00111 FLA_Datatype FLASH_Obj_datatype( FLA_Obj H ); 00112 dim_t FLASH_Obj_depth( FLA_Obj H ); 00113 dim_t FLASH_Obj_blocksizes( FLA_Obj H, dim_t* b_m, dim_t* b_n ); 00114 00115 FLA_Error FLASH_Obj_create( FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* b_mn, FLA_Obj* H ); 00116 FLA_Error FLASH_Obj_create_ext( FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00117 FLA_Error FLASH_Obj_create_without_buffer( FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* b_mn, FLA_Obj* H ); 00118 FLA_Error FLASH_Obj_create_without_buffer_ext( FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00119 00120 FLA_Error FLASH_Obj_create_helper( FLA_Bool without_buffer, FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00121 FLA_Error FLASH_Obj_create_hierarchy( FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* elem_sizes_m, dim_t* elem_sizes_n, FLA_Obj flat_matrix, FLA_Obj* H, unsigned long id, dim_t depth_overall, dim_t* depth_sizes_m, dim_t* depth_sizes_n, dim_t* m_offsets, dim_t* n_offsets ); 00122 00123 FLA_Error FLASH_Obj_create_conf_to( FLA_Trans trans, FLA_Obj H_cur, FLA_Obj* H_new ); 00124 FLA_Error FLASH_Obj_create_hier_conf_to_flat( FLA_Trans trans, FLA_Obj F, dim_t depth, dim_t* b_mn, FLA_Obj* H ); 00125 FLA_Error FLASH_Obj_create_hier_conf_to_flat_ext( FLA_Trans trans, FLA_Obj F, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00126 FLA_Error FLASH_Obj_create_flat_conf_to_hier( FLA_Trans trans, FLA_Obj H, FLA_Obj* F ); 00127 FLA_Error FLASH_Obj_create_copy_of( FLA_Trans trans, FLA_Obj H_cur, FLA_Obj* H_new ); 00128 FLA_Error FLASH_Obj_create_hier_copy_of_flat( FLA_Obj F, dim_t depth, dim_t* b_mn, FLA_Obj* H ); 00129 FLA_Error FLASH_Obj_create_hier_copy_of_flat_ext( FLA_Obj F, dim_t depth, dim_t* b_m, dim_t* b_n, FLA_Obj* H ); 00130 FLA_Error FLASH_Obj_create_flat_copy_of_hier( FLA_Obj H, FLA_Obj* F ); 00131 00132 void FLASH_Obj_free( FLA_Obj* H ); 00133 void FLASH_Obj_free_hierarchy( FLA_Obj* H ); 00134 void FLASH_Obj_free_without_buffer( FLA_Obj* H ); 00135 00136 FLA_Error FLASH_Obj_attach_buffer( void* buffer, dim_t rs, dim_t cs, FLA_Obj* H ); 00137 FLA_Error FLASH_Obj_attach_buffer_hierarchy( FLA_Obj F, FLA_Obj* H ); 00138 00139 FLA_Error FLASH_Obj_flatten( FLA_Obj H, FLA_Obj F ); 00140 FLA_Error FLASH_Obj_hierarchify( FLA_Obj F, FLA_Obj H ); 00141 00142 void* FLASH_Obj_extract_buffer( FLA_Obj H ); 00143 00144 FLA_Error FLASH_Obj_show( char* header, FLA_Obj H, char* elem_format, char* footer ); 00145 00146 void FLASH_print_struct( FLA_Obj H ); 00147 void FLASH_print_struct_helper( FLA_Obj H, int indent );