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