+ /* create costs matrix for interference edges */
+ struct pbqp_matrix *ife_matrix = pbqp_matrix_alloc(pbqp_co.pbqp, number_registers, number_registers);
+ /* set costs */
+ for(row = 0; row < number_registers; row++) {
+ for(col = 0; col < number_registers; col++) {
+ if(row == col) {
+ pbqp_matrix_set(ife_matrix, row, col, INF_COSTS);
+ }
+ else {
+ pbqp_matrix_set(ife_matrix, row, col, 0);
+ }
+ }
+ }
+
+ /* create costs matrix for affinity edges */
+ struct pbqp_matrix *afe_matrix = pbqp_matrix_alloc(pbqp_co.pbqp, number_registers, number_registers);
+ /* set costs */
+ for(row = 0; row < number_registers; row++) {
+ for(col = 0; col < number_registers; col++) {
+ if(row == col) {
+ pbqp_matrix_set(afe_matrix, row, col, 0);
+ }
+ else {
+ pbqp_matrix_set(afe_matrix, row, col, 2);
+ }
+ }
+ }
+