Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 2.32 KB

File metadata and controls

56 lines (42 loc) · 2.32 KB
title -arch (x64) | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-tools
ms.tgt_pltfrm
ms.topic article
dev_langs
C++
ms.assetid ecda22bf-5bed-43f4-99fb-88aedd83d9d8
caps.latest.revision 14
author corob-msft
ms.author corob
manager ghogen
ms.workload
cplusplus

/arch (x64)

Specifies the architecture for code generation on x64. Also see /arch (x86) and /arch (ARM).

Syntax

/arch:[AVX|AVX2]  

Arguments

/arch:AVX
Enables the use of Intel Advanced Vector Extensions instructions.

/arch:AVX2
Enables the use of Intel Advanced Vector Extensions 2 instructions.

Remarks

/arch only affects code generation for native functions. When you use /clr to compile, /arch has no effect on code generation for managed functions.

The __AVX__ preprocessor symbol is defined when the /arch:AVX compiler option is specified. The __AVX2__ preprocessor symbol is defined when the /arch:AVX2 compiler option is specified. For more information, see Predefined Macros. The /arch:AVX2 option was introduced in Visual Studio 2013 Update 2, version 12.0.34567.1.

To set the /arch:AVX or /arch:AVX2 compiler option in Visual Studio

  1. Open the Property Pages dialog box for the project. For more information, see Working with Project Properties.

  2. Select the Configuration Properties, C/C++ folder.

  3. Select the Code Generation property page.

  4. In the Enable Enhanced Instruction Set drop-down box, choose Advanced Vector Extensions (/arch:AVX) or Advanced Vector Extensions 2 (/arch:AVX2).

To set this compiler option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.EnableEnhancedInstructionSet%2A.

See Also

/arch (Minimum CPU Architecture)
Compiler Options
Setting Compiler Options