MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / main

Function main

src/library/tools/tplgen/tplgen.cpp:114–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114int main( int argc, char *argv[] )
115{
116 bool validKernel;
117 int lineCount;
118 size_t found;
119 string str;
120 int startOptions = 1;
121 const char *outputPrefix = "";
122 const char *inputPrefix = "";
123 char tempInputPrefix[1024];
124 const char *inputfile = "";
125
126 std::cout << "TPLGEN Running.....\n";
127 if (argc < 2)
128 {
129 return -1;
130 }
131
132 if (strcmp(argv[1], "-o") == 0)
133 {
134 if (argc < 3)
135 {
136 return -1;
137 }
138 outputPrefix = argv[2];
139 startOptions = 3;
140 }
141
142 if (strcmp(argv[startOptions], "-i") == 0)
143 {
144 inputPrefix = argv[startOptions + 1];
145 startOptions += 2;
146 }
147
148 for ( int i=startOptions; i<argc; i++ )
149 {
150 char cltFile[1024];
151
152 strcpy(cltFile, outputPrefix);
153 #ifdef __GNUC__
154 strcat(cltFile, "/");
155 #else
156 strcat(cltFile, "\\" );
157 #endif
158 strcat(cltFile, argv[i]);
159 strcat(cltFile, "T");
160
161 //if( !isModified(argv[i], cltFile ) )
162 //{
163 // continue;
164 //}
165 strcpy(tempInputPrefix, inputPrefix);
166 inputfile = strcat(tempInputPrefix, argv[i]);
167 std::cout << "Processing " << inputfile << std::endl;
168 std::cout << "output file " << cltFile << std::endl;
169
170 ifstream inFile(inputfile);
171 ofstream outFile( cltFile );

Callers

nothing calls this directly

Calls 3

binaryCaseProcessFunction · 0.85
findMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected