<?xml version="1.0" encoding="utf-8"?>
<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:transformCallback="Microsoft.Cpp.Dev10.ConvertPropertyCallback">
  <Rule
    Name="CUDA_Build_Rule"
    PageTemplate="tool"
    DisplayName="CUDA Build Rule v3.0.14"
    Order="200">
    <Rule.DataSource>
      <DataSource
        Persistence="ProjectFile"
        ItemType="CUDA_Build_Rule" />
    </Rule.DataSource>
    <Rule.Categories>
      <Category
        Name="General">
        <Category.DisplayName>
          <sys:String>General</sys:String>
        </Category.DisplayName>
      </Category>
      <Category
        Name="Command Line"
        Subtype="CommandLine">
        <Category.DisplayName>
          <sys:String>Command Line</sys:String>
        </Category.DisplayName>
      </Category>
    </Rule.Categories>
    <StringListProperty
      Name="Inputs"
      Category="Command Line"
      IsRequired="true"
      Switch=" ">
      <StringListProperty.DataSource>
        <DataSource
          Persistence="ProjectFile"
          ItemType="CUDA_Build_Rule"
          SourceType="Item" />
      </StringListProperty.DataSource>
    </StringListProperty>
    <BoolProperty
      Name="Debug"
      HelpContext="0"
      DisplayName="Generate Debug Information"
      Description="Specifies whether debugging with Nexus support is generated by the CUDA compiler.  (-D_DEBUG -D_WIN32)"
      Switch="-D_DEBUG -D_WIN32" />
    <BoolProperty
      Name="Emulation"
      HelpContext="0"
      DisplayName="Emulation Mode"
      Description="Whether or not to generate emulated code."
      Switch="-deviceemu -D_DEVICEEMU" />
    <BoolProperty
      Name="FastMath"
      Subcategory="Default"
      HelpContext="0"
      DisplayName="Use Fast Math"
      Description="Make use of the fast math library."
      Switch="-use_fast_math" />
    <BoolProperty
      Name="PtxAsOptionV"
      HelpContext="0"
      DisplayName="Verbose PTXAS Output"
      Switch="--ptxas-options=-v" />
    <BoolProperty
      Name="CInterleavedPTX"
      HelpContext="0"
      DisplayName="Interleave C in PTXAS Output"
      Switch="--opencc-options -LIST:source=on" />
    <BoolProperty
      Name="Keep"
      Category="Preprocessor"
      HelpContext="0"
      DisplayName="Keep preprocessed files (.ptx, .cubin, cudafe1.c, cudafe1.cpp, cudafe1.gpu, etc.)"
      Description="Specifies that preprocessor files generated by the CUDA compiler are not deleted."
      Switch="--keep" />
    <BoolProperty
      Name="TypeInfo"
      Category="Hybrid CUDA/C++ Options"
      HelpContext="0"
      DisplayName="Enable Run-Time Type Info"
      Description="Adds code for checking C++ object types at run time (runtime type information). (/GR)"
      Switch="/GR" />
    <StringListProperty
      Name="Include"
      HelpContext="0"
      DisplayName="Additional Include Directories"
      Description="Specifies one or more directories to add to the include path; use semi-colon delimited list if more than one.  (/I[path])"
      Separator=";"
      Switch="-I&quot;[value]&quot;" />
    <StringProperty
      Name="OutputFile"
      HelpContext="0"
      DisplayName="Compiler Output Filename"
      Switch="[value]" />
    <StringProperty
      Name="OverrideCompileOutName"
      HelpContext="0"
      DisplayName="Alternate Compiler Output File (non-standard installation)"
      Switch="[value]" />
    <StringProperty
      Name="AlternateNvccPath"
      HelpContext="0"
      DisplayName="Alternate path to NVCC.exe (non-standard installation)"
      Switch="[value]\nvcc.exe" />
    <StringProperty
      Name="ExtraNvccOptions"
      HelpContext="0"
      DisplayName="Extra Options"
      Description="Supply any additional command line options to NVCC"
      Switch="[value]" />
    <StringListProperty
      Name="Defines"
      Category="Preprocessor"
      HelpContext="0"
      DisplayName="Preprocessor Definitions"
      Description="Specifies one or more preprocessor defines.  (-D[macro])"
      Separator=";"
      Switch="-D[value]" />
    <StringProperty
      Name="AddedDependencies"
      HelpContext="0"
      DisplayName="Source Dependencies"
      Description="Add additional CUDA file dependencies"
      Switch="[value]" />
    <StringProperty
      Name="ExtraCppOptions"
      Category="Hybrid CUDA/C++ Options"
      HelpContext="0"
      DisplayName="Extra C++ Options"
      Description="Supply any additional command line options to the host C++ compiler"
      Switch="[value]" />
    <EnumProperty
      Name="NvccCompilation"
      HelpContext="0"
      DisplayName="NVCC Compilation Type"
      Description="Select desired output of NVCC compilation (-c/-compile, -cuda, -gpu, -cubin, -ptx)">
      <EnumValue
        Name="0"
        DisplayName="Generate hybrid object file  (--compile / -c)"
        Switch="--compile -o &quot;$(IntDir)\$(InputName).cu.obj&quot;" />
      <EnumValue
        Name="1"
        DisplayName="Generate hybrid .c file  (-cuda)"
        Switch="-cuda -o &quot;$(IntDir)\$(InputName).cu.c&quot;" />
      <EnumValue
        Name="2"
        DisplayName="Generate .gpu file  (-gpu)"
        Switch="-gpu -o &quot;$(IntDir)\$(InputName).gpu&quot;" />
      <EnumValue
        Name="3"
        DisplayName="Generate .cubin file  (-cubin)"
        Switch="-cubin -o &quot;data\$(InputName).cubin&quot;" />
      <EnumValue
        Name="4"
        DisplayName="Generate .ptx file  (-ptx)"
        Switch="-ptx -o &quot;data\$(InputName).ptx&quot;" />
      <EnumValue
        Name="5"
        DisplayName="Custom CUBIN Filename"
        Switch="-cubin -o &quot;[OutputFile].cubin&quot;" />
      <EnumValue
        Name="6"
        DisplayName="Custom PTX Filename"
        Switch="-ptx -o &quot;[OutputFile].ptx&quot;" />
    </EnumProperty>
    <EnumProperty
      Name="compileout"
      HelpContext="0"
      DisplayName="Compiler Output (obj/cubin/ptx)"
      Description="Sets output as an OBJ, CUBIN, or PTX file">
      <EnumValue
        Name="0"
        DisplayName="&quot;$(IntDir)/$(InputName).cu.obj&quot;"
        Switch="&quot;$(IntDir)/$(InputName).cu.obj&quot;" />
      <EnumValue
        Name="1"
        DisplayName="&quot;data/$(InputName).cubin&quot;"
        Switch="&quot;data/$(InputName).cubin&quot;" />
      <EnumValue
        Name="2"
        DisplayName="&quot;data/$(InputName).ptx&quot;"
        Switch="&quot;data/$(InputName).ptx&quot;" />
    </EnumProperty>
    <EnumProperty
      Name="Arch1"
      HelpContext="0"
      DisplayName="GPU Architecture (1)"
      Description="Select GPU architecture (1) to use on the command line (-arch sm_10, sm_11, sm_12, sm_13, sm_20)">
      <EnumValue
        Name="0"
        DisplayName="0"
        Switch="" />
      <EnumValue
        Name="10"
        DisplayName="sm_10"
        Switch="-gencode=arch=compute_10,code=\&quot;sm_10,compute_10\&quot;" />
      <EnumValue
        Name="11"
        DisplayName="sm_11"
        Switch="-gencode=arch=compute_11,code=\&quot;sm_11,compute_11\&quot;" />
      <EnumValue
        Name="12"
        DisplayName="sm_12"
        Switch="-gencode=arch=compute_12,code=\&quot;sm_12,compute_12\&quot;" />
      <EnumValue
        Name="13"
        DisplayName="sm_13"
        Switch="-gencode=arch=compute_13,code=\&quot;sm_13,compute_13\&quot;" />
      <EnumValue
        Name="20"
        DisplayName="sm_20"
        Switch="-gencode=arch=compute_20,code=\&quot;sm_20,compute_20\&quot;" />
    </EnumProperty>
    <EnumProperty
      Name="Arch2"
      HelpContext="0"
      DisplayName="GPU Architecture (2)"
      Description="Select GPU architecture (2) to use on the command line (-arch sm_10, sm_11, sm_12, sm_13, sm_20)">
      <EnumValue
        Name="0"
        DisplayName="0"
        Switch="" />
      <EnumValue
        Name="10"
        DisplayName="sm_10"
        Switch="-gencode=arch=compute_10,code=\&quot;sm_10,compute_10\&quot;" />
      <EnumValue
        Name="11"
        DisplayName="sm_11"
        Switch="-gencode=arch=compute_11,code=\&quot;sm_11,compute_11\&quot;" />
      <EnumValue
        Name="12"
        DisplayName="sm_12"
        Switch="-gencode=arch=compute_12,code=\&quot;sm_12,compute_12\&quot;" />
      <EnumValue
        Name="13"
        DisplayName="sm_13"
        Switch="-gencode=arch=compute_13,code=\&quot;sm_13,compute_13\&quot;" />
      <EnumValue
        Name="20"
        DisplayName="sm_20"
        Switch="-gencode=arch=compute_20,code=\&quot;sm_20,compute_20\&quot;" />
    </EnumProperty>
    <EnumProperty
      Name="Arch3"
      HelpContext="0"
      DisplayName="GPU Architecture (3)"
      Description="Select GPU architecture (3) to use on the command line (-arch sm_10, sm_11, sm_12, sm_13, sm_20)">
      <EnumValue
        Name="0"
        DisplayName="0"
        Switch="" />
      <EnumValue
        Name="10"
        DisplayName="sm_10"
        Switch="-gencode=arch=compute_10,code=\&quot;sm_10,compute_10\&quot;" />
      <EnumValue
        Name="11"
        DisplayName="sm_11"
        Switch="-gencode=arch=compute_11,code=\&quot;sm_11,compute_11\&quot;" />
      <EnumValue
        Name="12"
        DisplayName="sm_12"
        Switch="-gencode=arch=compute_12,code=\&quot;sm_12,compute_12\&quot;" />
      <EnumValue
        Name="13"
        DisplayName="sm_13"
        Switch="-gencode=arch=compute_13,code=\&quot;sm_13,compute_13\&quot;" />
      <EnumValue
        Name="20"
        DisplayName="sm_20"
        Switch="-gencode=arch=compute_20,code=\&quot;sm_20,compute_20\&quot;" />
    </EnumProperty>
    <EnumProperty
      Name="CompilerPath"
      HelpContext="0"
      DisplayName="Path to nvcc.exe"
      Description="Specifies the path to the CUDA compiler, nvcc.exe ">
      <EnumValue
        Name="0"
        DisplayName="Installed Toolkit (uses CUDA_BIN_PATH environment varible)"
        Switch="&quot;$(CUDA_BIN_PATH)\nvcc.exe&quot;" />
      <EnumValue
        Name="1"
        DisplayName="Use Alternate path to CUDA, specified below"
        Switch="&quot;[AlternateNvccPath]&quot;" />
    </EnumProperty>
    <EnumProperty
      Name="Warning"
      Category="Hybrid CUDA/C++ Options"
      HelpContext="0"
      DisplayName="Warning Level"
      Description="Select how strict you want the compiler to be about checking for potentially suspect constructs.   (/W0 - /W4)">
      <EnumValue
        Name="0"
        DisplayName="Off: Turn Off All Warnings (/W0)"
        Switch="/W0" />
      <EnumValue
        Name="1"
        DisplayName="Level 1 (/W1)"
        Switch="/W1" />
      <EnumValue
        Name="2"
        DisplayName="Level 2 (/W2)"
        Switch="/W2" />
      <EnumValue
        Name="3"
        DisplayName="Level 3 (/W3)"
        Switch="/W3" />
      <EnumValue
        Name="4"
        DisplayName="Level 4 (/W4)"
        Switch="/W4" />
    </EnumProperty>
    <EnumProperty
      Name="Optimization"
      HelpContext="0"
      DisplayName="Optimization"
      Description="Select option for code optimization; choose Custom to use specific optimization options.  (/Od, /O1, /O2, /Ox)">
      <EnumValue
        Name="0"
        DisplayName="Disabled (/Od)"
        Switch="/Od" />
      <EnumValue
        Name="1"
        DisplayName="Minimize Size (/O1)"
        Switch="/O1" />
      <EnumValue
        Name="2"
        DisplayName="Maximize Speed (/O2)"
        Switch="/O2" />
      <EnumValue
        Name="3"
        DisplayName="Full Optimization (/Ox)"
        Switch="/Ox" />
    </EnumProperty>
    <EnumProperty
      Name="RuntimeChecks"
      Category="Hybrid CUDA/C++ Options"
      HelpContext="0"
      DisplayName="Basic Runtime Checks"
      Description="Perform basic runtime error checks, incompatible with any optimization type other than debug.   (/RTCs, /RTCu, /RTC1)">
      <EnumValue
        Name="0"
        DisplayName="Default"
        Switch=" " />
      <EnumValue
        Name="1"
        DisplayName="Stack Frames (/RTCs)"
        Switch="/RTCs" />
      <EnumValue
        Name="2"
        DisplayName="Uninitialized Variables (/RTCu)"
        Switch="/RTCu" />
      <EnumValue
        Name="3"
        DisplayName="Both (/RTC1, equiv. to /RTCsu)"
        Switch="/RTC1" />
    </EnumProperty>
    <EnumProperty
      Name="Runtime"
      Category="Hybrid CUDA/C++ Options"
      HelpContext="0"
      DisplayName="Runtime Library"
      Description="Specify runtime library for linking.   (/MT, /MTd, /MD, /MDd, /ML, /MLd)">
      <EnumValue
        Name="0"
        DisplayName="Multi-Threaded (/MT)"
        Switch="/MT" />
      <EnumValue
        Name="1"
        DisplayName="Multi-Threaded Debug (/MTd)"
        Switch="/MTd" />
      <EnumValue
        Name="2"
        DisplayName="Multi-Threaded DLL (/MD)"
        Switch="/MD" />
      <EnumValue
        Name="3"
        DisplayName="Multi-Threaded Debug DLL (/MDd)"
        Switch="/MDd" />
      <EnumValue
        Name="4"
        DisplayName="Single-Threaded (/ML)"
        Switch="/ML" />
      <EnumValue
        Name="5"
        DisplayName="Single-Threaded Debug (/MLd)"
        Switch="/MLd" />
    </EnumProperty>
    <IntProperty
      Name="MaxRegCount"
      HelpContext="0"
      DisplayName="maxrregcount"
      Switch="-maxrregcount=[value]" />
    <StringProperty
      Name="CommandLineTemplate"
      DisplayName="Command Line"
      Visible="False"
      IncludeInCommandLine="False" />
    <DynamicEnumProperty
      Name="CUDA_Build_RuleBeforeTargets"
      Category="General"
      EnumProvider="Targets"
      IncludeInCommandLine="False">
      <DynamicEnumProperty.DisplayName>
        <sys:String>Execute Before</sys:String>
      </DynamicEnumProperty.DisplayName>
      <DynamicEnumProperty.Description>
        <sys:String>Specifies the targets for the build customization to run before.</sys:String>
      </DynamicEnumProperty.Description>
      <DynamicEnumProperty.ProviderSettings>
        <NameValuePair
          Name="Exclude"
          Value="^CUDA_Build_RuleBeforeTargets|^Compute" />
      </DynamicEnumProperty.ProviderSettings>
      <DynamicEnumProperty.DataSource>
        <DataSource
          Persistence="ProjectFile"
          HasConfigurationCondition="true" />
      </DynamicEnumProperty.DataSource>
    </DynamicEnumProperty>
    <DynamicEnumProperty
      Name="CUDA_Build_RuleAfterTargets"
      Category="General"
      EnumProvider="Targets"
      IncludeInCommandLine="False">
      <DynamicEnumProperty.DisplayName>
        <sys:String>Execute After</sys:String>
      </DynamicEnumProperty.DisplayName>
      <DynamicEnumProperty.Description>
        <sys:String>Specifies the targets for the build customization to run after.</sys:String>
      </DynamicEnumProperty.Description>
      <DynamicEnumProperty.ProviderSettings>
        <NameValuePair
          Name="Exclude"
          Value="^CUDA_Build_RuleAfterTargets|^Compute" />
      </DynamicEnumProperty.ProviderSettings>
      <DynamicEnumProperty.DataSource>
        <DataSource
          Persistence="ProjectFile"
          ItemType=""
          HasConfigurationCondition="true" />
      </DynamicEnumProperty.DataSource>
    </DynamicEnumProperty>
    <StringListProperty
      Name="Outputs"
      DisplayName="Outputs"
      Visible="False"
      IncludeInCommandLine="False" />
    <StringProperty
      Name="ExecutionDescription"
      DisplayName="Execution Description"
      Visible="False"
      IncludeInCommandLine="False" />
    <StringListProperty
      Name="AdditionalDependencies"
      DisplayName="Additional Dependencies"
      IncludeInCommandLine="False"
      Visible="false" />
    <StringProperty
      Subtype="AdditionalOptions"
      Name="AdditionalOptions"
      Category="Command Line">
      <StringProperty.DisplayName>
        <sys:String>Additional Options</sys:String>
      </StringProperty.DisplayName>
      <StringProperty.Description>
        <sys:String>Additional Options</sys:String>
      </StringProperty.Description>
    </StringProperty>
  </Rule>
  <ItemType
    Name="CUDA_Build_Rule"
    DisplayName="CUDA Build Rule v3.0.14" />
  <FileExtension
    Name="*.cu"
    ContentType="CUDA_Build_Rule" />
  <ContentType
    Name="CUDA_Build_Rule"
    DisplayName="CUDA Build Rule v3.0.14"
    ItemType="CUDA_Build_Rule" />
</ProjectSchemaDefinitions>