Welcome to mirror list, hosted at ThFree Co, Russian Federation.

msvc_arch_flags.c « cmake « cycles « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b6761c069424ee0dbce3b6fd6be0852179bb609c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* SPDX-License-Identifier: Apache-2.0
 * Copyright 2011-2022 Blender Foundation */

#include <isa_availability.h>
#include <stdio.h>

/* The MS CRT defines this */
extern int __isa_available;

const char *get_arch_flags()
{
  if (__isa_available >= __ISA_AVAILABLE_AVX2) {
    return "/arch:AVX2";
  }
  if (__isa_available >= __ISA_AVAILABLE_AVX) {
    return "/arch:AVX";
  }
  return "";
}

int main()
{
  printf("%s\n", get_arch_flags());
  return 0;
}