Blender  V3.3
msvc_arch_flags.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2011-2022 Blender Foundation */
3 
4 #include <isa_availability.h>
5 #include <stdio.h>
6 
7 /* The MS CRT defines this */
8 extern int __isa_available;
9 
10 const char *get_arch_flags()
11 {
12  if (__isa_available >= __ISA_AVAILABLE_AVX2) {
13  return "/arch:AVX2";
14  }
15  if (__isa_available >= __ISA_AVAILABLE_AVX) {
16  return "/arch:AVX";
17  }
18  return "";
19 }
20 
21 int main()
22 {
23  printf("%s\n", get_arch_flags());
24  return 0;
25 }
const char * get_arch_flags()
int __isa_available
int main()