/[escript]/trunk/paso/src/SystemMatrixPattern.h
ViewVC logotype

Diff of /trunk/paso/src/SystemMatrixPattern.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4817 by caltinay, Fri Mar 28 08:04:09 2014 UTC revision 4818 by caltinay, Mon Mar 31 00:16:20 2014 UTC
# Line 35  Line 35 
35    
36  namespace paso {  namespace paso {
37    
38    struct SystemMatrixPattern;
39    typedef boost::shared_ptr<SystemMatrixPattern> SystemMatrixPattern_ptr;
40    typedef boost::shared_ptr<const SystemMatrixPattern> const_SystemMatrixPattern_ptr;
41    
42  PASO_DLL_API  PASO_DLL_API
43  struct SystemMatrixPattern  struct SystemMatrixPattern : boost::enable_shared_from_this<SystemMatrixPattern>
44  {  {
45      // constructor      // constructor
46      SystemMatrixPattern(int type, Distribution_ptr output_distribution,      SystemMatrixPattern(int type, Distribution_ptr output_distribution,
# Line 44  struct SystemMatrixPattern Line 48  struct SystemMatrixPattern
48          Pattern* col_couplePattern, Pattern* row_couplePattern,          Pattern* col_couplePattern, Pattern* row_couplePattern,
49          Connector_ptr col_connector, Connector_ptr row_connector);          Connector_ptr col_connector, Connector_ptr row_connector);
50    
51      int type;      ~SystemMatrixPattern()
52        {
53            Pattern_free(mainPattern);
54            Pattern_free(row_couplePattern);
55            Pattern_free(col_couplePattern);
56            Esys_MPIInfo_free(mpi_info);
57        }
58    
59        inline index_t getNumOutput() const {
60            return mainPattern->numOutput;
61        }
62    
63      Esys_MPIInfo* mpi_info;      SystemMatrixPattern_ptr unrollBlocks(int type, dim_t output_block_size,
64                                             dim_t input_block_size);
65    
66        int type;
67        Esys_MPIInfo* mpi_info;
68      Pattern* mainPattern;      Pattern* mainPattern;
69      Pattern* col_couplePattern;      Pattern* col_couplePattern;
70      Pattern* row_couplePattern;      Pattern* row_couplePattern;
# Line 55  struct SystemMatrixPattern Line 72  struct SystemMatrixPattern
72      Connector_ptr row_connector;      Connector_ptr row_connector;
73      Distribution_ptr output_distribution;      Distribution_ptr output_distribution;
74      Distribution_ptr input_distribution;      Distribution_ptr input_distribution;
   
     dim_t reference_counter;  
75  };  };
76    
77    
 /*  interfaces: */  
   
 PASO_DLL_API  
 SystemMatrixPattern* SystemMatrixPattern_getReference(SystemMatrixPattern*);  
   
 PASO_DLL_API  
 void SystemMatrixPattern_free(SystemMatrixPattern*);  
   
 SystemMatrixPattern* SystemMatrixPattern_unrollBlocks(  
                                            SystemMatrixPattern* pattern,  
                                            int type, dim_t output_block_size,  
                                            dim_t input_block_size);  
   
 index_t SystemMatrixPattern_getNumOutput(const SystemMatrixPattern*);  
   
78  } // namespace paso  } // namespace paso
79    
80  #endif // __PASO_SYSTEMMATRIXPATTERN_H__  #endif // __PASO_SYSTEMMATRIXPATTERN_H__

Legend:
Removed from v.4817  
changed lines
  Added in v.4818

  ViewVC Help
Powered by ViewVC 1.1.26