libflame  revision_anchor
FLASH_main_prototypes.h
Go to the documentation of this file.
00001 /*
00002 
00003     Copyright (C) 2014, The University of Texas at Austin
00004 
00005     This file is part of libflame and is available under the 3-Clause
00006     BSD license, which can be found in the LICENSE file at the top-level
00007     directory, or at http://opensource.org/licenses/BSD-3-Clause
00008 
00009 */
00010 
00011 // -----------------------------------------------------------------------------
00012 
00013 FLA_Error    FLASH_Obj_blocksizes_check( FLA_Obj H, dim_t* b_m, dim_t* b_n );
00014 
00015 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 );
00016 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 );
00017 
00018 FLA_Error    FLASH_Obj_create_conf_to_check( FLA_Trans trans, FLA_Obj H_cur, FLA_Obj* H_new );
00019 
00020 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 );
00021 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 );
00022 FLA_Error    FLASH_Obj_create_flat_conf_to_hier_check( FLA_Trans trans, FLA_Obj H, FLA_Obj* F );
00023 FLA_Error    FLASH_Obj_create_hier_copy_of_flat_check( FLA_Obj F, dim_t depth, dim_t* b_mn, FLA_Obj* H );
00024 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 );
00025 FLA_Error    FLASH_Obj_create_flat_copy_of_hier_check( FLA_Obj H, FLA_Obj* F );
00026 
00027 FLA_Error    FLASH_Obj_free_check( FLA_Obj* H );
00028 FLA_Error    FLASH_Obj_free_without_buffer_check( FLA_Obj* H );
00029 FLA_Error    FLASH_Obj_free_hierarchy_check( FLA_Obj* H );
00030 
00031 FLA_Error    FLASH_Obj_attach_buffer_check( void *buffer, dim_t rs, dim_t cs, FLA_Obj* H );
00032 FLA_Error    FLASH_Obj_attach_buffer_hierarchy_check( FLA_Obj F, FLA_Obj* H );
00033 
00034 // -----------------------------------------------------------------------------
00035 
00036 FLA_Error FLASH_Part_create_2x1( FLA_Obj A,    FLA_Obj* AT,
00037                                                FLA_Obj* AB,
00038                                  dim_t n_rows, FLA_Side side );
00039 FLA_Error FLASH_Part_create_1x2( FLA_Obj A,    FLA_Obj* AL, FLA_Obj* AR,
00040                                  dim_t n_cols, FLA_Side side );
00041 FLA_Error FLASH_Part_create_2x2( FLA_Obj A,    FLA_Obj* ATL, FLA_Obj* ATR,
00042                                                FLA_Obj* ABL, FLA_Obj* ABR,
00043                                  dim_t n_rows, dim_t n_cols, FLA_Side side );
00044 
00045 FLA_Error FLASH_Part_free_2x1( FLA_Obj* AT,
00046                                FLA_Obj* AB );
00047 FLA_Error FLASH_Part_free_1x2( FLA_Obj* AL, FLA_Obj* AR );
00048 FLA_Error FLASH_Part_free_2x2( FLA_Obj* ATL, FLA_Obj* ATR,
00049                                FLA_Obj* ABL, FLA_Obj* ABR );
00050 
00051 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 );
00052 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 );
00053 
00054 dim_t FLASH_Obj_scalar_length( FLA_Obj H );
00055 dim_t FLASH_Obj_scalar_width( FLA_Obj H );
00056 dim_t FLASH_Obj_scalar_min_dim( FLA_Obj H );
00057 dim_t FLASH_Obj_scalar_max_dim( FLA_Obj H );
00058 dim_t FLASH_Obj_scalar_vector_dim( FLA_Obj H );
00059 dim_t FLASH_Obj_scalar_row_offset( FLA_Obj H );
00060 dim_t FLASH_Obj_scalar_col_offset( FLA_Obj H );
00061 dim_t FLASH_Obj_scalar_length_tl( FLA_Obj H );
00062 dim_t FLASH_Obj_scalar_width_tl( FLA_Obj H );
00063 dim_t FLASH_Obj_base_scalar_length( FLA_Obj H );
00064 dim_t FLASH_Obj_base_scalar_width( FLA_Obj H );
00065 
00066 FLA_Error FLASH_Obj_show( char* header, FLA_Obj H, char* elem_format, char* footer );
00067 FLA_Error FLASH_Obj_show_hierarchy( FLA_Obj H, dim_t i, char* elem_format );
00068 
00069 // -----------------------------------------------------------------------------
00070 
00071 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 );
00072 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 );
00073 FLA_Error    FLASH_Axpy_flat_to_hier( FLA_Obj alpha, FLA_Obj F, dim_t i, dim_t j, FLA_Obj H );
00074 FLA_Error    FLASH_Axpy_hier_to_flat( FLA_Obj alpha, dim_t i, dim_t j, FLA_Obj H, FLA_Obj F );
00075 
00076 FLA_Error    FLASH_Axpy_hierarchy( int direction, FLA_Obj alpha, FLA_Obj F, FLA_Obj* H );
00077 
00078 // -----------------------------------------------------------------------------
00079 
00080 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 );
00081 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 );
00082 FLA_Error    FLASH_Copy_flat_to_hier( FLA_Obj F, dim_t i, dim_t j, FLA_Obj H );
00083 FLA_Error    FLASH_Copy_hier_to_flat( dim_t i, dim_t j, FLA_Obj H, FLA_Obj F );
00084 
00085 FLA_Error    FLASH_Copy_hierarchy( int direction, FLA_Obj F, FLA_Obj* H );
00086 
00087 // -----------------------------------------------------------------------------
00088 
00089 FLA_Datatype FLASH_Obj_datatype( FLA_Obj H );
00090 dim_t        FLASH_Obj_depth( FLA_Obj H );
00091 dim_t        FLASH_Obj_blocksizes( FLA_Obj H, dim_t* b_m, dim_t* b_n );
00092 
00093 FLA_Error    FLASH_Obj_create( FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t* b_mn, FLA_Obj* H );
00094 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 );
00095 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 );
00096 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 );
00097 
00098 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 );
00099 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 );
00100 
00101 FLA_Error    FLASH_Obj_create_conf_to( FLA_Trans trans, FLA_Obj H_cur, FLA_Obj* H_new );
00102 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 );
00103 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 );
00104 FLA_Error    FLASH_Obj_create_flat_conf_to_hier( FLA_Trans trans, FLA_Obj H, FLA_Obj* F );
00105 FLA_Error    FLASH_Obj_create_copy_of( FLA_Trans trans, FLA_Obj H_cur, FLA_Obj* H_new );
00106 FLA_Error    FLASH_Obj_create_hier_copy_of_flat( FLA_Obj F, dim_t depth, dim_t* b_mn, FLA_Obj* H );
00107 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 );
00108 FLA_Error    FLASH_Obj_create_flat_copy_of_hier( FLA_Obj H, FLA_Obj* F );
00109 
00110 void         FLASH_Obj_free( FLA_Obj* H );
00111 void         FLASH_Obj_free_hierarchy( FLA_Obj* H );
00112 void         FLASH_Obj_free_without_buffer( FLA_Obj* H );
00113 
00114 FLA_Error    FLASH_Obj_attach_buffer( void* buffer, dim_t rs, dim_t cs, FLA_Obj* H );
00115 FLA_Error    FLASH_Obj_attach_buffer_hierarchy( FLA_Obj F, FLA_Obj* H );
00116 
00117 FLA_Error    FLASH_Obj_flatten( FLA_Obj H, FLA_Obj F );
00118 FLA_Error    FLASH_Obj_hierarchify( FLA_Obj F, FLA_Obj H );
00119 
00120 void*        FLASH_Obj_extract_buffer( FLA_Obj H );
00121 
00122 FLA_Error    FLASH_Obj_show( char* header, FLA_Obj H, char* elem_format, char* footer );
00123 
00124 void         FLASH_print_struct( FLA_Obj H );
00125 void         FLASH_print_struct_helper( FLA_Obj H, int indent );