annotate src/of-fl-core-1-fixes.patch @ 4043:b54e00ea56bc

of-fl-core: readd fl-core patch in dos mode * src/of-fl-core-1-fixes.patch: readd patch
author John Donoghue
date Fri, 02 Oct 2015 10:24:38 -0400
parents 1c72016826aa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4043
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
1 diff -ur fl-core.orig/src/fl_compose.cc fl-core/src/fl_compose.cc
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
2 --- fl-core.orig/src/fl_compose.cc 2015-10-02 10:13:53.044225859 -0400
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
3 +++ fl-core/src/fl_compose.cc 2015-10-02 10:22:05.635130470 -0400
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
4 @@ -63,14 +63,14 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
5 // Structure for thread arguments. Each thread will perform the computation between the start_index and end_index row.
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
6 struct threadArg
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
7 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
8 - int start_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
9 - int end_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
10 + octave_idx_type start_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
11 + octave_idx_type end_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
12 };
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
13
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
14
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
15 // Functions prototype declaration
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
16 -float get_elem(float vec[], int row, int col,int numCols);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
17 -void set_elem(float vec[], int row, int col, int numCols, float elem);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
18 +float get_elem(float vec[], octave_idx_type row, octave_idx_type col,octave_idx_type numCols);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
19 +void set_elem(float vec[], octave_idx_type row, octave_idx_type col, octave_idx_type numCols, float elem);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
20 int is_valid_function(octave_function *func);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
21 void *thread_function(void *arg);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
22 int get_available_cpus();
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
23 @@ -110,13 +110,13 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
24 SparseMatrix sparseC;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
25
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
26 // Matrices dimensions
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
27 -long int rowsA,rowsB,colsA,colsB,rowsC,colsC;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
28 +octave_idx_type rowsA,rowsB,colsA,colsB,rowsC,colsC;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
29
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
30 // Lock option. 1 = calculation executed only for the diagonal of the matrix
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
31 int lock_option;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
32
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
33 // The increment
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
34 -int col_index_increment;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
35 +octave_idx_type col_index_increment;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
36
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
37 // Number of threads that will be created
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
38 int num_threads;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
39 @@ -357,8 +357,9 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
40 else
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
41 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
42 Matrix outMatrix(rowsC,colsC);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
43 - for(int i=0;i<rowsC;i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
44 - for(int j=0;j<colsC;j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
45 +
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
46 + for(octave_idx_type i=0;i<rowsC;i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
47 + for(octave_idx_type j=0;j<colsC;j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
48 outMatrix(i,j) = get_elem(c,i,j,colsC);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
49
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
50 if(sparse_res)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
51 @@ -390,15 +391,15 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
52 // Initialize the first matrix
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
53 Matrix tempMatrix = args(0).matrix_value();
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
54 a = new float[rowsA*colsA];
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
55 - for (int i=0; i<rowsA; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
56 - for(int j=0; j<colsA;j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
57 + for (octave_idx_type i=0; i<rowsA; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
58 + for(octave_idx_type j=0; j<colsA;j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
59 a[i*colsA+j] = tempMatrix(i,j);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
60
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
61 // Initialize the second matrix
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
62 tempMatrix = args(1).matrix_value();
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
63 b = new float[rowsB*colsB];
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
64 - for (int i=0; i<rowsB; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
65 - for(int j=0; j<colsB;j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
66 + for (octave_idx_type i=0; i<rowsB; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
67 + for(octave_idx_type j=0; j<colsB;j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
68 b[i*colsB+j] = tempMatrix(i,j);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
69
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
70
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
71 @@ -418,7 +419,7 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
72 }
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
73
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
74 // Define the number interval of rows for each thread
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
75 - int interval = rowsA / num_threads;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
76 + octave_idx_type interval = rowsA / num_threads;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
77
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
78 int i;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
79 // Define the threads
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
80 @@ -465,22 +466,22 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
81 float tnorm_val;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
82
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
83 // Initialize the result sparse matrix
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
84 - sparseC = SparseMatrix((int)colsB, (int)rowsA, (int)(colsB*rowsA));
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
85 + sparseC = SparseMatrix(colsB, rowsA, (colsB*rowsA));
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
86
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
87 // Initialize the number of nonzero elements in the sparse matrix c
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
88 int nel = 0;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
89 sparseC.xcidx(0) = 0;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
90
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
91 // Calculate the composition for each element
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
92 - for (int i = 0; i < rowsC; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
93 + for (octave_idx_type i = 0; i < rowsC; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
94 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
95 - for(int j = 0; j < colsC; j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
96 + for(octave_idx_type j = 0; j < colsC; j++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
97 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
98
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
99 // Get the index of the first element of the i-th column of a transpose (i-th row of a)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
100 // and the index of the first element of the j-th column of b
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
101 - int ka = a.cidx(i);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
102 - int kb = b.cidx(j);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
103 + octave_idx_type ka = a.cidx(i);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
104 + octave_idx_type kb = b.cidx(j);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
105 snorm_val = 0;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
106
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
107 // Check if the values of the matrix are really not 0 (it happens if the column of a or b hasn't any value)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
108 @@ -549,18 +550,18 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
109 float tnorm_val;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
110
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
111 // Get the row start_index and end_index
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
112 - int start_index = thread_args->start_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
113 - int end_index = thread_args->end_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
114 + octave_idx_type start_index = thread_args->start_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
115 + octave_idx_type end_index = thread_args->end_index;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
116
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
117
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
118 // Calculate the composition for the specified rows (between start_index and end_index)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
119 - for (int i=start_index; i<end_index; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
120 + for (octave_idx_type i=start_index; i<end_index; i++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
121 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
122 - for(int j=lock_option*i; j<colsB; j=j+col_index_increment)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
123 + for(octave_idx_type j=lock_option*i; j<colsB; j=j+col_index_increment)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
124 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
125 snorm_val = calc_tnorm(get_elem(a,i,0,colsA),get_elem(b,0,j,colsB));
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
126
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
127 - for(int k=1; k<colsA; k++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
128 + for(octave_idx_type k=1; k<colsA; k++)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
129 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
130 tnorm_val = calc_tnorm(get_elem(a,i,k,colsA),get_elem(b,k,j,colsB));
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
131 snorm_val = calc_snorm(snorm_val,tnorm_val);
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
132 @@ -767,7 +768,7 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
133
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
134
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
135 /* Get the (i,j)-th element from the vector vec. The column number of the original matrix (numCols) is required */
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
136 -float get_elem(float vec[], int row, int col,int numCols)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
137 +float get_elem(float vec[], octave_idx_type row, octave_idx_type col,octave_idx_type numCols)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
138 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
139 return vec[row*numCols+col];
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
140 }
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
141 @@ -775,7 +776,7 @@
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
142
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
143
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
144 /* Set the (i,j)-th element from the vector vec. The column number of the original matrix (numCols) is required */
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
145 -void set_elem(float vec[], int row, int col, int numCols, float elem)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
146 +void set_elem(float vec[], octave_idx_type row, octave_idx_type col, octave_idx_type numCols, float elem)
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
147 {
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
148 vec[row*numCols+col] = elem;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
149 return;
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
150 diff -ur fl-core.orig/src/Makefile fl-core/src/Makefile
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
151 --- fl-core.orig/src/Makefile 2015-10-02 10:13:53.044225859 -0400
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
152 +++ fl-core/src/Makefile 2015-10-02 10:16:20.899198805 -0400
3854
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
153 @@ -1,15 +1,23 @@
3420
207b5f6713d9 Update fl-core for current release patch
John Donoghue <john.donoghue@ieee.org>
parents: 3419
diff changeset
154 OCT = fl_compose.oct
207b5f6713d9 Update fl-core for current release patch
John Donoghue <john.donoghue@ieee.org>
parents: 3419
diff changeset
155 SRC := $(OCT:.oct=.cc)
3419
e7e29aeea726 Add octave forge 'fl-core' package
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
156 BASE := $(OCT:.oct=)
3420
207b5f6713d9 Update fl-core for current release patch
John Donoghue <john.donoghue@ieee.org>
parents: 3419
diff changeset
157 -ifdef COMSPEC
4043
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
158 - ADDPARAM := -lpthreadVC2
3420
207b5f6713d9 Update fl-core for current release patch
John Donoghue <john.donoghue@ieee.org>
parents: 3419
diff changeset
159 +
3854
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
160 +MKOCTFILE ?= mkoctfile
3860
b36a7ab4bd2c of-fl-core: use OCTAVE_CONFIG to determine system type
John Donoghue <john.donoghue@ieee.org>
parents: 3854
diff changeset
161 +OCTAVE_CONFIG ?= octave-config
3854
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
162 +
3860
b36a7ab4bd2c of-fl-core: use OCTAVE_CONFIG to determine system type
John Donoghue <john.donoghue@ieee.org>
parents: 3854
diff changeset
163 +ifneq (,$(findstring mingw,$(shell $(OCTAVE_CONFIG) -p CANONICAL_HOST_TYPE)))
3419
e7e29aeea726 Add octave forge 'fl-core' package
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
164 + ADDPARAM := -lpthread
e7e29aeea726 Add octave forge 'fl-core' package
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
165 +else
3420
207b5f6713d9 Update fl-core for current release patch
John Donoghue <john.donoghue@ieee.org>
parents: 3419
diff changeset
166 + ifdef COMSPEC
4043
b54e00ea56bc of-fl-core: readd fl-core patch in dos mode
John Donoghue
parents: 4039
diff changeset
167 + ADDPARAM := -lpthreadVC2
3420
207b5f6713d9 Update fl-core for current release patch
John Donoghue <john.donoghue@ieee.org>
parents: 3419
diff changeset
168 + endif
3419
e7e29aeea726 Add octave forge 'fl-core' package
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
169 endif
e7e29aeea726 Add octave forge 'fl-core' package
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
170
e7e29aeea726 Add octave forge 'fl-core' package
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
171 .phony: all
3854
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
172 all: $(OCT)
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
173
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
174 %.oct: %.cc
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
175 - mkoctfile -s $< $(ADDPARAM)
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
176 + $(MKOCTFILE) -s $< $(ADDPARAM)
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
177
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
178 .phony: clean
85568f3159a4 binary-packages: update for cross tools
John Donoghue
parents: 3420
diff changeset
179 clean: