48 }
else if (arch ==
"x86_64" || arch ==
"x86-64") {
50 }
else if (arch ==
"arm") {
52 }
else if (arch ==
"aarch64") {
54 }
else if (arch ==
"wasm32") {
89 if (target ==
"host") {
91 }
else if (target ==
"sse2-i32x4" || target ==
"sse2") {
93 }
else if (target ==
"sse2-i32x8" || target ==
"sse2-x2") {
95 }
else if (target ==
"sse4-i8x16") {
97 }
else if (target ==
"sse4-i16x8") {
99 }
else if (target ==
"sse4-i32x4" || target ==
"sse4") {
101 }
else if (target ==
"sse4-i32x8" || target ==
"sse4-x2" || target ==
"sse4x2") {
103 }
else if (target ==
"avx1-i32x4") {
105 }
else if (target ==
"avx1-i32x8" || target ==
"avx" || target ==
"avx1") {
107 }
else if (target ==
"avx1-i64x4" || target ==
"avx-i64x4") {
109 }
else if (target ==
"avx1-i32x16" || target ==
"avx-x2" || target ==
"avx1-x2") {
111 }
else if (target ==
"avx2-i32x4") {
113 }
else if (target ==
"avx2-i32x8" || target ==
"avx2") {
115 }
else if (target ==
"avx2-i64x4") {
117 }
else if (target ==
"avx2-i32x16" || target ==
"avx2-x2") {
119 }
else if (target ==
"avx512knl-i32x16") {
121 }
else if (target ==
"avx512skx-i32x16") {
123 }
else if (target ==
"avx512skx-i32x8") {
125 }
else if (target ==
"generic-1" || target ==
"generic-x1") {
127 }
else if (target ==
"generic-4" || target ==
"generic-x4") {
129 }
else if (target ==
"generic-8" || target ==
"generic-x8") {
131 }
else if (target ==
"generic-16" || target ==
"generic-x16") {
133 }
else if (target ==
"generic-32" || target ==
"generic-x32") {
135 }
else if (target ==
"generic-64" || target ==
"generic-x64") {
137 }
else if (target ==
"neon-i8x16") {
139 }
else if (target ==
"neon-i16x8") {
141 }
else if (target ==
"neon-i32x4" || target ==
"neon") {
143 }
else if (target ==
"neon-i32x8") {
145 }
else if (target ==
"wasm-i32x4") {
157 std::vector<ISPCTarget> targets;
158 std::string error_target;
159 const char *tstart = target;
162 const char *tend = strchr(tstart,
',');
165 tend = strchr(tstart,
'\0');
167 std::string target_string = std::string(tstart, tend);
170 if (!error_target.empty()) {
173 error_target += target_string;
175 targets.push_back(target_parsed);
179 return std::make_pair(targets, error_target);
203 return "avx1-i32x16";
211 return "avx2-i32x16";
215 return "avx512knl-i32x16";
217 return "avx512skx-i32x8";
219 return "avx512skx-i32x16";
313 if (supportedOses.find(os) == std::string::npos) {
316 if (os ==
"windows") {
318 }
else if (os ==
"linux") {
320 }
else if (os ==
"custom_linux") {
322 }
else if (os ==
"freebsd") {
324 }
else if (os ==
"macos") {
326 }
else if (os ==
"android") {
328 }
else if (os ==
"ios") {
330 }
else if (os ==
"ps4") {
332 }
else if (os ==
"web") {
345 return "Linux (custom)";
371 return "custom_linux";
391 #if defined(ISPC_HOST_IS_WINDOWS) && !defined(ISPC_WINDOWS_TARGET_OFF) 393 #elif defined(ISPC_HOST_IS_LINUX) && !defined(ISPC_LINUX_TARGET_OFF) 395 #elif defined(ISPC_HOST_IS_FREEBSD) && !defined(ISPC_FREEBSD_TARGET_OFF) 397 #elif defined(ISPC_HOST_IS_APPLE) && !defined(ISPC_MACOS_TARGET_OFF)
std::string ArchToString(Arch arch)
Define enums describing target platform.
TargetLibRegistry * target_registry
std::string getSupportedOSes()
std::string OSToString(TargetOS os)
bool ISPCTargetIsX86(ISPCTarget target)
Arch ParseArch(std::string arch)
ISPCTarget ParseISPCTarget(std::string target)
Representation of a range of positions in a source file.
std::string ISPCTargetToString(ISPCTarget target)
void Error(SourcePos p, const char *fmt,...)
TargetOS ParseOS(std::string os)
std::string OSToLowerString(TargetOS os)
bool ISPCTargetIsNeon(ISPCTarget target)
Main ispc.header file. Defines Target, Globals and Opt classes.
bool ISPCTargetIsWasm(ISPCTarget target)
std::pair< std::vector< ISPCTarget >, std::string > ParseISPCTargets(const char *target)
bool ISPCTargetIsGeneric(ISPCTarget target)