Changeset 2025


Ignore:
Timestamp:
09/25/08 10:00:08 (6 years ago)
Author:
gemacke
Message:

Updates to get test_subgraph_isomorphism to compile on MTA.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/mtgl/al_graph_adapter.hpp

    r1951 r2025  
    337337type(const al_edge_adapter& e, const Vertex* v) 
    338338{ 
    339   if (v->getID() == e.first->getID())  return e.get_type1(); 
    340   else if (v->getID() == e.second->getID())  return e.get_type2(); 
     339  short rtype; 
     340  if (v->getID() == e.first->getID())  rtype = e.get_type1(); 
     341  else if (v->getID() == e.second->getID())  rtype = e.get_type2(); 
    341342  else  assert(false); 
     343  return rtype; 
    342344} 
    343345 
     
    347349other(const al_edge_adapter& e, const Vertex* v) 
    348350{ 
    349   if (v->getID() == e.first->getID())  return e.second; 
    350   else if (v->getID() == e.second->getID())  return e.first; 
     351  al_graph_adapter::vertex_descriptor rother; 
     352  if (v->getID() == e.first->getID())  rother = e.second; 
     353  else if (v->getID() == e.second->getID())  rother = e.first; 
    351354  else  assert(false); 
     355  return rother; 
    352356} 
    353357 
  • trunk/mtgl/subgraph_adapter.hpp

    r1951 r2025  
    582582  int num_induced_edges = 0; 
    583583 
    584   #pragma assert nodep 
     584  #pragma mta assert nodep 
    585585  for (int i = 0;  i <size; ++i) 
    586586  { 
     
    591591  int next = 0; 
    592592 
    593   #pragma assert parallel 
     593  #pragma mta assert parallel 
    594594  for (int i = 0;  i < size; ++i) 
    595595  { 
  • trunk/mtgl/subgraph_isomorphism.hpp

    r2020 r2025  
    99           searches using the visitor classes in isomorphism_visitor.h. 
    1010 
    11     The big graph and target graphs can be independent types.  The target 
    12     graph must be a primary graph adapter (ie not a wrapper adapter like 
    13     subgraph_adpater or transpose_adapter). 
     11    The big graph and target graphs are independent graph types that can be 
     12    either a primary graph adapter or a wrapper adapter. 
    1413 
    1514    The algorithm takes a function object that defines the comparison made 
     
    538537  void run() 
    539538  { 
     539                mt_timer mttimer;        
     540                mttimer.start(); 
     541 
    540542#ifdef __MTA__ 
    541543    int streams = mta_get_task_counter(RT_STREAMS); 
     
    779781    if (use_vert_count_filter)  delete [] bgVertCount; 
    780782 
     783                mttimer.stop(); 
     784                long postticks = mttimer.getElapsedTicks(); 
     785 
    781786#ifdef __MTA__ 
    782787    streams = mta_get_task_counter(RT_STREAMS) - streams; 
     
    785790    m_nops = mta_get_task_counter(RT_M_NOP) - m_nops; 
    786791    a_nops = mta_get_task_counter(RT_A_NOP) - a_nops; 
    787     a_nops = mta_get_task_counter(RT_FLOAT_TOTAL) - fp_ops; 
     792    fp_ops = mta_get_task_counter(RT_FLOAT_TOTAL) - fp_ops; 
    788793 
    789794    printf("issues: %d, memrefs: %d, fp_ops: %d, ", issues, memrefs, fp_ops); 
  • trunk/mtgl/xmt_hash_set.hpp

    r1846 r2025  
    267267 
    268268template <class T, class eqfcn> 
    269 typename xmt_hash_set<T,eqfcn>::xmt_hash_set& 
     269xmt_hash_set<T,eqfcn>& 
    270270xmt_hash_set<T,eqfcn>::operator=(const xmt_hash_set& rhs) 
    271271{ 
  • trunk/test/al_graph.cpp

    r1914 r2025  
    288288Edge::type(const Vertex* v) const 
    289289{ 
    290   if (v->getID() == from->getID())  return type1; 
    291   else if (v->getID() == to->getID())  return type2; 
     290  short rtype; 
     291  if (v->getID() == from->getID())  rtype = type1; 
     292  else if (v->getID() == to->getID())  rtype = type2; 
    292293  else  assert(false); 
     294  return rtype; 
    293295} 
    294296 
     
    298300Edge::other(const Vertex* v) const 
    299301{ 
    300   if (v->getID() == from->getID())  return to; 
    301   else if (v->getID() == to->getID())  return from; 
     302  Vertex* rother; 
     303  if (v->getID() == from->getID())  rother = to; 
     304  else if (v->getID() == to->getID())  rother = from; 
    302305  else  assert(false); 
    303 } 
    304  
    305 } 
     306  return rother; 
     307} 
     308 
     309} 
Note: See TracChangeset for help on using the changeset viewer.