void InterconnectInterface::CreateInterconnect(unsigned n_shader, unsigned n_mem) { _n_shader = n_shader; _n_mem = n_mem; InitializeRoutingMap(*_icnt_config); gPrintActivity = (_icnt_config->GetInt("print_activity") > 0); gTrace = (_icnt_config->GetInt("viewer_trace") > 0); string watch_out_file = _icnt_config->GetStr( "watch_out" ); if(watch_out_file == "") { gWatchOut = NULL; } else if(watch_out_file == "-") { gWatchOut = &cout; } else { gWatchOut = new ofstream(watch_out_file.c_str()); } _subnets = _icnt_config->GetInt("subnets"); assert(_subnets); /*To include a new network, must register the network here *add an else if statement with the name of the network */ _net.resize(_subnets); for (int i = 0; i < _subnets; ++i) { ostringstream name; name << "network_" << i; _net[i] = Network::New( *_icnt_config, name.str() ); } assert(_icnt_config->GetStr("sim_type") == "gpgpusim"); _traffic_manager = static_cast<GPUTrafficManager*>(TrafficManager::New( *_icnt_config, _net )) ; _flit_size = _icnt_config->GetInt( "flit_size" ); // Config for interface buffers if (_icnt_config->GetInt("ejection_buffer_size")) { _ejection_buffer_capacity = _icnt_config->GetInt( "ejection_buffer_size" ) ; } else { _ejection_buffer_capacity = _icnt_config->GetInt( "vc_buf_size" ); } _boundary_buffer_capacity = _icnt_config->GetInt( "boundary_buffer_size" ) ; assert(_boundary_buffer_capacity); if (_icnt_config->GetInt("input_buffer_size")) { _input_buffer_capacity = _icnt_config->GetInt("input_buffer_size"); } else { _input_buffer_capacity = 9; } _vcs = _icnt_config->GetInt("num_vcs"); _CreateBuffer(); _CreateNodeMap(_n_shader, _n_mem, _traffic_manager->_nodes, _icnt_config->GetInt("use_map")); }
glmENTER2(glmARGINT, Count, glmARGPTR, Buffers) { GLsizei i; glsNAMEDOBJECT_PTR wrapper; glmPROFILE(context, GLES1_GENBUFFERS, 0); /* Validate count. */ if (Count < 0) { glmERROR(GL_INVALID_VALUE); break; } /* Don't do anything if Buffers is NULL. */ if (Buffers == gcvNULL) { break; } /* Generate buffers. */ for (i = 0; i < Count; i++) { /* Create a new wrapper. */ if (gcmIS_SUCCESS(_CreateBuffer(context, 0, &wrapper))) { Buffers[i] = wrapper->name; } else { Buffers[i] = 0; } } gcmDUMP_API("${ES11 glGenBuffers 0x%08X (0x%08X)", Count, Buffers); gcmDUMP_API_ARRAY(Buffers, Count); gcmDUMP_API("$}"); }