Implement new naming scheme for --target.

Now targets are named like "<isa>-i<mask size>x<gang size>", e.g.
"sse4-i8x16", or "avx2-i32x16".

The old target names are still supported.
This commit is contained in:
Matt Pharr
2013-08-08 19:23:44 -07:00
parent 1d76f74b16
commit 0c5742b6f8
7 changed files with 163 additions and 100 deletions

14
util.h
View File

@@ -156,4 +156,18 @@ void GetDirectoryAndFileName(const std::string &currentDir,
bool VerifyDataLayoutCompatibility(const std::string &module_dl,
const std::string &lib_dl);
/** Print the given string to the given FILE, assuming the given output
column width. Break words as needed to avoid words spilling past the
last column. */
void PrintWithWordBreaks(const char *buf, int indent, int columnWidth,
FILE *out);
/** Returns the width of the terminal where the compiler is running.
Finding this out may fail in a variety of reasonable situations (piping
compiler output to 'less', redirecting output to a file, running the
compiler under a debuffer; in this case, just return a reasonable
default.
*/
int TerminalWidth();
#endif // ISPC_UTIL_H