mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-04-12 20:38:31 +08:00
Merge branch 'master' into pr/58
This commit is contained in:
commit
306af8d275
2
.vs/CMakeWorkspaceSettings.json
Normal file
2
.vs/CMakeWorkspaceSettings.json
Normal file
|
@ -0,0 +1,2 @@
|
|||
{
|
||||
}
|
3
.vs/ProjectSettings.json
Normal file
3
.vs/ProjectSettings.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"CurrentProjectSetting": "x64-Debug"
|
||||
}
|
959
.vs/Samples_VS2022/config/applicationhost.config
Normal file
959
.vs/Samples_VS2022/config/applicationhost.config
Normal file
|
@ -0,0 +1,959 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
IIS configuration sections.
|
||||
|
||||
For schema documentation, see
|
||||
%IIS_BIN%\config\schema\IIS_schema.xml.
|
||||
|
||||
Please make a backup of this file before making any changes to it.
|
||||
|
||||
NOTE: The following environment variables are available to be used
|
||||
within this file and are understood by the IIS Express.
|
||||
|
||||
%IIS_USER_HOME% - The IIS Express home directory for the user
|
||||
%IIS_SITES_HOME% - The default home directory for sites
|
||||
%IIS_BIN% - The location of the IIS Express binaries
|
||||
%SYSTEMDRIVE% - The drive letter of %IIS_BIN%
|
||||
|
||||
-->
|
||||
<configuration>
|
||||
<!--
|
||||
|
||||
The <configSections> section controls the registration of sections.
|
||||
Section is the basic unit of deployment, locking, searching and
|
||||
containment for configuration settings.
|
||||
|
||||
Every section belongs to one section group.
|
||||
A section group is a container of logically-related sections.
|
||||
|
||||
Sections cannot be nested.
|
||||
Section groups may be nested.
|
||||
|
||||
<section
|
||||
name="" [Required, Collection Key] [XML name of the section]
|
||||
allowDefinition="Everywhere" [MachineOnly|MachineToApplication|AppHostOnly|Everywhere] [Level where it can be set]
|
||||
overrideModeDefault="Allow" [Allow|Deny] [Default delegation mode]
|
||||
allowLocation="true" [true|false] [Allowed in location tags]
|
||||
/>
|
||||
|
||||
The recommended way to unlock sections is by using a location tag:
|
||||
<location path="Default Web Site" overrideMode="Allow">
|
||||
<system.webServer>
|
||||
<asp />
|
||||
</system.webServer>
|
||||
</location>
|
||||
|
||||
-->
|
||||
<configSections>
|
||||
<sectionGroup name="system.applicationHost">
|
||||
<section name="applicationPools" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="configHistory" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="customMetadata" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="listenerAdapters" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="log" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="serviceAutoStartProviders" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="sites" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="webLimits" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.webServer">
|
||||
<section name="asp" overrideModeDefault="Deny" />
|
||||
<section name="caching" overrideModeDefault="Allow" />
|
||||
<section name="cgi" overrideModeDefault="Deny" />
|
||||
<section name="defaultDocument" overrideModeDefault="Allow" />
|
||||
<section name="directoryBrowse" overrideModeDefault="Allow" />
|
||||
<section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="globalModules" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="handlers" overrideModeDefault="Deny" />
|
||||
<section name="httpCompression" overrideModeDefault="Allow" allowDefinition="Everywhere" />
|
||||
<section name="httpErrors" overrideModeDefault="Allow" />
|
||||
<section name="httpLogging" overrideModeDefault="Deny" />
|
||||
<section name="httpProtocol" overrideModeDefault="Allow" />
|
||||
<section name="httpRedirect" overrideModeDefault="Allow" />
|
||||
<section name="httpTracing" overrideModeDefault="Deny" />
|
||||
<section name="isapiFilters" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
|
||||
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
|
||||
<section name="applicationInitialization" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
|
||||
<section name="odbcLogging" overrideModeDefault="Deny" />
|
||||
<sectionGroup name="security">
|
||||
<section name="access" overrideModeDefault="Deny" />
|
||||
<section name="applicationDependencies" overrideModeDefault="Deny" />
|
||||
<sectionGroup name="authentication">
|
||||
<section name="anonymousAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="basicAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="clientCertificateMappingAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="digestAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="windowsAuthentication" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<section name="authorization" overrideModeDefault="Allow" />
|
||||
<section name="ipSecurity" overrideModeDefault="Deny" />
|
||||
<section name="dynamicIpSecurity" overrideModeDefault="Deny" />
|
||||
<section name="isapiCgiRestriction" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="requestFiltering" overrideModeDefault="Allow" />
|
||||
</sectionGroup>
|
||||
<section name="serverRuntime" overrideModeDefault="Deny" />
|
||||
<section name="serverSideInclude" overrideModeDefault="Deny" />
|
||||
<section name="staticContent" overrideModeDefault="Allow" />
|
||||
<sectionGroup name="tracing">
|
||||
<section name="traceFailedRequests" overrideModeDefault="Allow" />
|
||||
<section name="traceProviderDefinitions" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<section name="urlCompression" overrideModeDefault="Allow" />
|
||||
<section name="validation" overrideModeDefault="Allow" />
|
||||
<sectionGroup name="webdav">
|
||||
<section name="globalSettings" overrideModeDefault="Deny" />
|
||||
<section name="authoring" overrideModeDefault="Deny" />
|
||||
<section name="authoringRules" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="rewrite">
|
||||
<section name="allowedServerVariables" overrideModeDefault="Deny" />
|
||||
<section name="rules" overrideModeDefault="Allow" />
|
||||
<section name="outboundRules" overrideModeDefault="Allow" />
|
||||
<section name="globalRules" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
|
||||
<section name="providers" overrideModeDefault="Allow" />
|
||||
<section name="rewriteMaps" overrideModeDefault="Allow" />
|
||||
</sectionGroup>
|
||||
<section name="webSocket" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<configProtectedData>
|
||||
<providers>
|
||||
<add name="IISWASOnlyRsaProvider" type="" description="Uses RsaCryptoServiceProvider to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
|
||||
<add name="AesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisConfigurationKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="AQIAAA5mAAAApAAA/HKxkz6alrlAPez0IUgujj/6k3WxCDriHp6jvpv3yEZmo7h6SMzGLxo4mTrIQVHSkB7tmElHKfUFTzE2BWF7nFWHY6Z6qmGBauFzwJMwESjril7Gjz69RBFH259HQ6aRDq9Xfx7U7H4HtdmnKNqGjgl/hwPQBGeIlWiDh+sYv3vKB0QU971tjX6H2B+9armlnC8UOuA6JYMDMI/VLLL16sng0fWAy5JYe0YVABVjiAWDW264RZW9Tr1Oax4qHZKg+SdjULxeOc2YmpX+d0yeITo1HkPF1hN1gHpIPIUDo05ilHUNfR3OkjVCIQK4cFKCq1s8NH+y+13MxUC4Fn1AlQ==" />
|
||||
<add name="IISWASOnlyAesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="AQIAAA5mAAAApAAALmU8lTC+v2qtfQiiiquvvLpUQqKLEXs+jSKoWCM/uPhyB++k4dwug19mGidNK5FYiWK2KYE1yhjVJcbp12E98Q0R2nT7eBiCMY2JairxQ591rqABK7keGaIjwH7PwGzSpILl3RJ4YFvJ/7ZXEJxeDZIjW8ZxWVXx+/VyHs9U3WguLEkgMUX3jrxJi8LouxaIVPJAv/YQ1ZCWs8zImitxX/C/7o7yaIxznfsN5nGQzQfpUDPeby99aw2zPVTtZI2LaWIBON8guABvZ6JtJVDWmfdK6sodbnwdZkr6/Z2rfvamT1dC1SpQrGG7ulR/f9/GXvCaW10ZVKxekBF/CYlNMg==" />
|
||||
</providers>
|
||||
</configProtectedData>
|
||||
<system.applicationHost>
|
||||
<applicationPools>
|
||||
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" />
|
||||
<applicationPoolDefaults managedRuntimeVersion="v4.0">
|
||||
<processModel loadUserProfile="true" setProfileEnvironment="false" />
|
||||
</applicationPoolDefaults>
|
||||
</applicationPools>
|
||||
<!--
|
||||
|
||||
The <listenerAdapters> section defines the protocols with which the
|
||||
Windows Process Activation Service (WAS) binds.
|
||||
|
||||
-->
|
||||
<listenerAdapters>
|
||||
<add name="http" />
|
||||
</listenerAdapters>
|
||||
<sites>
|
||||
<site name="WebSite1" id="1" serverAutoStart="true">
|
||||
<application path="/">
|
||||
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation=":8080:localhost" />
|
||||
</bindings>
|
||||
</site>
|
||||
<siteDefaults>
|
||||
<!-- To enable logging, please change the below attribute "enabled" to "true" -->
|
||||
<logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" />
|
||||
<traceFailedRequestsLogging directory="%AppData%\Microsoft" enabled="false" maxLogFileSizeKB="1024" />
|
||||
</siteDefaults>
|
||||
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
|
||||
<virtualDirectoryDefaults allowSubDirConfig="true" />
|
||||
</sites>
|
||||
<webLimits />
|
||||
</system.applicationHost>
|
||||
<system.webServer>
|
||||
<serverRuntime />
|
||||
<asp scriptErrorSentToBrowser="true">
|
||||
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
|
||||
<limits />
|
||||
</asp>
|
||||
<caching enabled="true" enableKernelCache="true">
|
||||
</caching>
|
||||
<cgi />
|
||||
<defaultDocument enabled="true">
|
||||
<files>
|
||||
<add value="Default.htm" />
|
||||
<add value="Default.asp" />
|
||||
<add value="index.htm" />
|
||||
<add value="index.html" />
|
||||
<add value="iisstart.htm" />
|
||||
<add value="default.aspx" />
|
||||
</files>
|
||||
</defaultDocument>
|
||||
<directoryBrowse enabled="false" />
|
||||
<fastCgi />
|
||||
<!--
|
||||
|
||||
The <globalModules> section defines all native-code modules.
|
||||
To enable a module, specify it in the <modules> section.
|
||||
|
||||
-->
|
||||
<globalModules>
|
||||
<add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" />
|
||||
<add name="UriCacheModule" image="%IIS_BIN%\cachuri.dll" />
|
||||
<add name="TokenCacheModule" image="%IIS_BIN%\cachtokn.dll" />
|
||||
<add name="DynamicCompressionModule" image="%IIS_BIN%\compdyn.dll" />
|
||||
<add name="StaticCompressionModule" image="%IIS_BIN%\compstat.dll" />
|
||||
<add name="DefaultDocumentModule" image="%IIS_BIN%\defdoc.dll" />
|
||||
<add name="DirectoryListingModule" image="%IIS_BIN%\dirlist.dll" />
|
||||
<add name="ProtocolSupportModule" image="%IIS_BIN%\protsup.dll" />
|
||||
<add name="HttpRedirectionModule" image="%IIS_BIN%\redirect.dll" />
|
||||
<add name="ServerSideIncludeModule" image="%IIS_BIN%\iis_ssi.dll" />
|
||||
<add name="StaticFileModule" image="%IIS_BIN%\static.dll" />
|
||||
<add name="AnonymousAuthenticationModule" image="%IIS_BIN%\authanon.dll" />
|
||||
<add name="CertificateMappingAuthenticationModule" image="%IIS_BIN%\authcert.dll" />
|
||||
<add name="UrlAuthorizationModule" image="%IIS_BIN%\urlauthz.dll" />
|
||||
<add name="BasicAuthenticationModule" image="%IIS_BIN%\authbas.dll" />
|
||||
<add name="WindowsAuthenticationModule" image="%IIS_BIN%\authsspi.dll" />
|
||||
<add name="IISCertificateMappingAuthenticationModule" image="%IIS_BIN%\authmap.dll" />
|
||||
<add name="IpRestrictionModule" image="%IIS_BIN%\iprestr.dll" />
|
||||
<add name="DynamicIpRestrictionModule" image="%IIS_BIN%\diprestr.dll" />
|
||||
<add name="RequestFilteringModule" image="%IIS_BIN%\modrqflt.dll" />
|
||||
<add name="CustomLoggingModule" image="%IIS_BIN%\logcust.dll" />
|
||||
<add name="CustomErrorModule" image="%IIS_BIN%\custerr.dll" />
|
||||
<add name="FailedRequestsTracingModule" image="%IIS_BIN%\iisfreb.dll" />
|
||||
<add name="RequestMonitorModule" image="%IIS_BIN%\iisreqs.dll" />
|
||||
<add name="IsapiModule" image="%IIS_BIN%\isapi.dll" />
|
||||
<add name="IsapiFilterModule" image="%IIS_BIN%\filter.dll" />
|
||||
<add name="CgiModule" image="%IIS_BIN%\cgi.dll" />
|
||||
<add name="FastCgiModule" image="%IIS_BIN%\iisfcgi.dll" />
|
||||
<!-- <add name="WebDAVModule" image="%IIS_BIN%\webdav.dll" /> -->
|
||||
<add name="RewriteModule" image="%IIS_BIN%\rewrite.dll" />
|
||||
<add name="ConfigurationValidationModule" image="%IIS_BIN%\validcfg.dll" />
|
||||
<add name="WebSocketModule" image="%IIS_BIN%\iiswsock.dll" />
|
||||
<add name="WebMatrixSupportModule" image="%IIS_BIN%\webmatrixsup.dll" />
|
||||
<add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />
|
||||
<add name="ManagedEngine64" image="%windir%\Microsoft.NET\Framework64\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness64" />
|
||||
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" />
|
||||
</globalModules>
|
||||
<httpCompression directory="%TEMP%">
|
||||
<scheme name="gzip" dll="%IIS_BIN%\gzip.dll" />
|
||||
<dynamicTypes>
|
||||
<add mimeType="text/*" enabled="true" />
|
||||
<add mimeType="message/*" enabled="true" />
|
||||
<add mimeType="application/x-javascript" enabled="true" />
|
||||
<add mimeType="application/javascript" enabled="true" />
|
||||
<add mimeType="*/*" enabled="false" />
|
||||
<add mimeType="text/event-stream" enabled="false" />
|
||||
</dynamicTypes>
|
||||
<staticTypes>
|
||||
<add mimeType="text/*" enabled="true" />
|
||||
<add mimeType="message/*" enabled="true" />
|
||||
<add mimeType="application/javascript" enabled="true" />
|
||||
<add mimeType="application/atom+xml" enabled="true" />
|
||||
<add mimeType="application/xaml+xml" enabled="true" />
|
||||
<add mimeType="image/svg+xml" enabled="true" />
|
||||
<add mimeType="*/*" enabled="false" />
|
||||
</staticTypes>
|
||||
</httpCompression>
|
||||
<httpErrors lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
|
||||
<error statusCode="401" prefixLanguageFilePath="%IIS_BIN%\custerr" path="401.htm" />
|
||||
<error statusCode="403" prefixLanguageFilePath="%IIS_BIN%\custerr" path="403.htm" />
|
||||
<error statusCode="404" prefixLanguageFilePath="%IIS_BIN%\custerr" path="404.htm" />
|
||||
<error statusCode="405" prefixLanguageFilePath="%IIS_BIN%\custerr" path="405.htm" />
|
||||
<error statusCode="406" prefixLanguageFilePath="%IIS_BIN%\custerr" path="406.htm" />
|
||||
<error statusCode="412" prefixLanguageFilePath="%IIS_BIN%\custerr" path="412.htm" />
|
||||
<error statusCode="500" prefixLanguageFilePath="%IIS_BIN%\custerr" path="500.htm" />
|
||||
<error statusCode="501" prefixLanguageFilePath="%IIS_BIN%\custerr" path="501.htm" />
|
||||
<error statusCode="502" prefixLanguageFilePath="%IIS_BIN%\custerr" path="502.htm" />
|
||||
</httpErrors>
|
||||
<httpLogging dontLog="false" />
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<clear />
|
||||
<add name="X-Powered-By" value="ASP.NET" />
|
||||
</customHeaders>
|
||||
<redirectHeaders>
|
||||
<clear />
|
||||
</redirectHeaders>
|
||||
</httpProtocol>
|
||||
<httpRedirect enabled="false" />
|
||||
<httpTracing />
|
||||
<isapiFilters>
|
||||
<filter name="ASP.Net_2.0.50727-64" path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv2.0" />
|
||||
<filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv2.0" />
|
||||
<filter name="ASP.Net_2.0_for_v1.1" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv1.1" />
|
||||
<filter name="ASP.Net_4.0_32bit" path="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv4.0" />
|
||||
<filter name="ASP.Net_4.0_64bit" path="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv4.0" />
|
||||
</isapiFilters>
|
||||
<odbcLogging />
|
||||
<security>
|
||||
<access sslFlags="None" />
|
||||
<applicationDependencies>
|
||||
<application name="Active Server Pages" groupId="ASP" />
|
||||
</applicationDependencies>
|
||||
<authentication>
|
||||
<anonymousAuthentication enabled="true" userName="" />
|
||||
<basicAuthentication enabled="false" />
|
||||
<clientCertificateMappingAuthentication enabled="false" />
|
||||
<digestAuthentication enabled="false" />
|
||||
<iisClientCertificateMappingAuthentication enabled="false">
|
||||
</iisClientCertificateMappingAuthentication>
|
||||
<windowsAuthentication enabled="false">
|
||||
<providers>
|
||||
<add value="Negotiate" />
|
||||
<add value="NTLM" />
|
||||
</providers>
|
||||
</windowsAuthentication>
|
||||
</authentication>
|
||||
<authorization>
|
||||
<add accessType="Allow" users="*" />
|
||||
</authorization>
|
||||
<ipSecurity allowUnlisted="true" />
|
||||
<isapiCgiRestriction notListedIsapisAllowed="true" notListedCgisAllowed="true">
|
||||
<add path="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" />
|
||||
<add path="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" />
|
||||
<add path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" />
|
||||
<add path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" />
|
||||
</isapiCgiRestriction>
|
||||
<requestFiltering>
|
||||
<fileExtensions allowUnlisted="true" applyToWebDAV="true">
|
||||
<add fileExtension=".asa" allowed="false" />
|
||||
<add fileExtension=".asax" allowed="false" />
|
||||
<add fileExtension=".ascx" allowed="false" />
|
||||
<add fileExtension=".master" allowed="false" />
|
||||
<add fileExtension=".skin" allowed="false" />
|
||||
<add fileExtension=".browser" allowed="false" />
|
||||
<add fileExtension=".sitemap" allowed="false" />
|
||||
<add fileExtension=".config" allowed="false" />
|
||||
<add fileExtension=".cs" allowed="false" />
|
||||
<add fileExtension=".csproj" allowed="false" />
|
||||
<add fileExtension=".vb" allowed="false" />
|
||||
<add fileExtension=".vbproj" allowed="false" />
|
||||
<add fileExtension=".webinfo" allowed="false" />
|
||||
<add fileExtension=".licx" allowed="false" />
|
||||
<add fileExtension=".resx" allowed="false" />
|
||||
<add fileExtension=".resources" allowed="false" />
|
||||
<add fileExtension=".mdb" allowed="false" />
|
||||
<add fileExtension=".vjsproj" allowed="false" />
|
||||
<add fileExtension=".java" allowed="false" />
|
||||
<add fileExtension=".jsl" allowed="false" />
|
||||
<add fileExtension=".ldb" allowed="false" />
|
||||
<add fileExtension=".dsdgm" allowed="false" />
|
||||
<add fileExtension=".ssdgm" allowed="false" />
|
||||
<add fileExtension=".lsad" allowed="false" />
|
||||
<add fileExtension=".ssmap" allowed="false" />
|
||||
<add fileExtension=".cd" allowed="false" />
|
||||
<add fileExtension=".dsprototype" allowed="false" />
|
||||
<add fileExtension=".lsaprototype" allowed="false" />
|
||||
<add fileExtension=".sdm" allowed="false" />
|
||||
<add fileExtension=".sdmDocument" allowed="false" />
|
||||
<add fileExtension=".mdf" allowed="false" />
|
||||
<add fileExtension=".ldf" allowed="false" />
|
||||
<add fileExtension=".ad" allowed="false" />
|
||||
<add fileExtension=".dd" allowed="false" />
|
||||
<add fileExtension=".ldd" allowed="false" />
|
||||
<add fileExtension=".sd" allowed="false" />
|
||||
<add fileExtension=".adprototype" allowed="false" />
|
||||
<add fileExtension=".lddprototype" allowed="false" />
|
||||
<add fileExtension=".exclude" allowed="false" />
|
||||
<add fileExtension=".refresh" allowed="false" />
|
||||
<add fileExtension=".compiled" allowed="false" />
|
||||
<add fileExtension=".msgx" allowed="false" />
|
||||
<add fileExtension=".vsdisco" allowed="false" />
|
||||
<add fileExtension=".rules" allowed="false" />
|
||||
</fileExtensions>
|
||||
<verbs allowUnlisted="true" applyToWebDAV="true" />
|
||||
<hiddenSegments applyToWebDAV="true">
|
||||
<add segment="web.config" />
|
||||
<add segment="bin" />
|
||||
<add segment="App_code" />
|
||||
<add segment="App_GlobalResources" />
|
||||
<add segment="App_LocalResources" />
|
||||
<add segment="App_WebReferences" />
|
||||
<add segment="App_Data" />
|
||||
<add segment="App_Browsers" />
|
||||
</hiddenSegments>
|
||||
</requestFiltering>
|
||||
</security>
|
||||
<serverSideInclude ssiExecDisable="false" />
|
||||
<staticContent lockAttributes="isDocFooterFileName">
|
||||
<mimeMap fileExtension=".323" mimeType="text/h323" />
|
||||
<mimeMap fileExtension=".3g2" mimeType="video/3gpp2" />
|
||||
<mimeMap fileExtension=".3gp2" mimeType="video/3gpp2" />
|
||||
<mimeMap fileExtension=".3gp" mimeType="video/3gpp" />
|
||||
<mimeMap fileExtension=".3gpp" mimeType="video/3gpp" />
|
||||
<mimeMap fileExtension=".aac" mimeType="audio/aac" />
|
||||
<mimeMap fileExtension=".aaf" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".aca" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".accdb" mimeType="application/msaccess" />
|
||||
<mimeMap fileExtension=".accde" mimeType="application/msaccess" />
|
||||
<mimeMap fileExtension=".accdt" mimeType="application/msaccess" />
|
||||
<mimeMap fileExtension=".acx" mimeType="application/internet-property-stream" />
|
||||
<mimeMap fileExtension=".adt" mimeType="audio/vnd.dlna.adts" />
|
||||
<mimeMap fileExtension=".adts" mimeType="audio/vnd.dlna.adts" />
|
||||
<mimeMap fileExtension=".afm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ai" mimeType="application/postscript" />
|
||||
<mimeMap fileExtension=".aif" mimeType="audio/x-aiff" />
|
||||
<mimeMap fileExtension=".aifc" mimeType="audio/aiff" />
|
||||
<mimeMap fileExtension=".aiff" mimeType="audio/aiff" />
|
||||
<mimeMap fileExtension=".appcache" mimeType="text/cache-manifest" />
|
||||
<mimeMap fileExtension=".application" mimeType="application/x-ms-application" />
|
||||
<mimeMap fileExtension=".art" mimeType="image/x-jg" />
|
||||
<mimeMap fileExtension=".asd" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".asf" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".asi" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".asm" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".asr" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".asx" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".atom" mimeType="application/atom+xml" />
|
||||
<mimeMap fileExtension=".au" mimeType="audio/basic" />
|
||||
<mimeMap fileExtension=".avi" mimeType="video/avi" />
|
||||
<mimeMap fileExtension=".axs" mimeType="application/olescript" />
|
||||
<mimeMap fileExtension=".bas" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".bcpio" mimeType="application/x-bcpio" />
|
||||
<mimeMap fileExtension=".bin" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".bmp" mimeType="image/bmp" />
|
||||
<mimeMap fileExtension=".c" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".cab" mimeType="application/vnd.ms-cab-compressed" />
|
||||
<mimeMap fileExtension=".calx" mimeType="application/vnd.ms-office.calx" />
|
||||
<mimeMap fileExtension=".cat" mimeType="application/vnd.ms-pki.seccat" />
|
||||
<mimeMap fileExtension=".cdf" mimeType="application/x-cdf" />
|
||||
<mimeMap fileExtension=".chm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".class" mimeType="application/x-java-applet" />
|
||||
<mimeMap fileExtension=".clp" mimeType="application/x-msclip" />
|
||||
<mimeMap fileExtension=".cmx" mimeType="image/x-cmx" />
|
||||
<mimeMap fileExtension=".cnf" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".cod" mimeType="image/cis-cod" />
|
||||
<mimeMap fileExtension=".cpio" mimeType="application/x-cpio" />
|
||||
<mimeMap fileExtension=".cpp" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".crd" mimeType="application/x-mscardfile" />
|
||||
<mimeMap fileExtension=".crl" mimeType="application/pkix-crl" />
|
||||
<mimeMap fileExtension=".crt" mimeType="application/x-x509-ca-cert" />
|
||||
<mimeMap fileExtension=".csh" mimeType="application/x-csh" />
|
||||
<mimeMap fileExtension=".css" mimeType="text/css" />
|
||||
<mimeMap fileExtension=".csv" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".cur" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".dcr" mimeType="application/x-director" />
|
||||
<mimeMap fileExtension=".deploy" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".der" mimeType="application/x-x509-ca-cert" />
|
||||
<mimeMap fileExtension=".dib" mimeType="image/bmp" />
|
||||
<mimeMap fileExtension=".dir" mimeType="application/x-director" />
|
||||
<mimeMap fileExtension=".disco" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".dll" mimeType="application/x-msdownload" />
|
||||
<mimeMap fileExtension=".dll.config" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".dlm" mimeType="text/dlm" />
|
||||
<mimeMap fileExtension=".doc" mimeType="application/msword" />
|
||||
<mimeMap fileExtension=".docm" mimeType="application/vnd.ms-word.document.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".docx" mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
|
||||
<mimeMap fileExtension=".dot" mimeType="application/msword" />
|
||||
<mimeMap fileExtension=".dotm" mimeType="application/vnd.ms-word.template.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".dotx" mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.template" />
|
||||
<mimeMap fileExtension=".dsp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".dtd" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".dvi" mimeType="application/x-dvi" />
|
||||
<mimeMap fileExtension=".dvr-ms" mimeType="video/x-ms-dvr" />
|
||||
<mimeMap fileExtension=".dwf" mimeType="drawing/x-dwf" />
|
||||
<mimeMap fileExtension=".dwp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".dxr" mimeType="application/x-director" />
|
||||
<mimeMap fileExtension=".eml" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".emz" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
|
||||
<mimeMap fileExtension=".eps" mimeType="application/postscript" />
|
||||
<mimeMap fileExtension=".esd" mimeType="application/vnd.ms-cab-compressed" />
|
||||
<mimeMap fileExtension=".etx" mimeType="text/x-setext" />
|
||||
<mimeMap fileExtension=".evy" mimeType="application/envoy" />
|
||||
<mimeMap fileExtension=".exe" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".exe.config" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".fdf" mimeType="application/vnd.fdf" />
|
||||
<mimeMap fileExtension=".fif" mimeType="application/fractals" />
|
||||
<mimeMap fileExtension=".fla" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".flr" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".flv" mimeType="video/x-flv" />
|
||||
<mimeMap fileExtension=".gif" mimeType="image/gif" />
|
||||
<mimeMap fileExtension=".glb" mimeType="model/gltf-binary" />
|
||||
<mimeMap fileExtension=".gtar" mimeType="application/x-gtar" />
|
||||
<mimeMap fileExtension=".gz" mimeType="application/x-gzip" />
|
||||
<mimeMap fileExtension=".h" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".hdf" mimeType="application/x-hdf" />
|
||||
<mimeMap fileExtension=".hdml" mimeType="text/x-hdml" />
|
||||
<mimeMap fileExtension=".hhc" mimeType="application/x-oleobject" />
|
||||
<mimeMap fileExtension=".hhk" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".hhp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".hlp" mimeType="application/winhlp" />
|
||||
<mimeMap fileExtension=".hqx" mimeType="application/mac-binhex40" />
|
||||
<mimeMap fileExtension=".hta" mimeType="application/hta" />
|
||||
<mimeMap fileExtension=".htc" mimeType="text/x-component" />
|
||||
<mimeMap fileExtension=".htm" mimeType="text/html" />
|
||||
<mimeMap fileExtension=".html" mimeType="text/html" />
|
||||
<mimeMap fileExtension=".htt" mimeType="text/webviewhtml" />
|
||||
<mimeMap fileExtension=".hxt" mimeType="text/html" />
|
||||
<mimeMap fileExtension=".ico" mimeType="image/x-icon" />
|
||||
<mimeMap fileExtension=".ics" mimeType="text/calendar" />
|
||||
<mimeMap fileExtension=".ief" mimeType="image/ief" />
|
||||
<mimeMap fileExtension=".iii" mimeType="application/x-iphone" />
|
||||
<mimeMap fileExtension=".inf" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ins" mimeType="application/x-internet-signup" />
|
||||
<mimeMap fileExtension=".isp" mimeType="application/x-internet-signup" />
|
||||
<mimeMap fileExtension=".IVF" mimeType="video/x-ivf" />
|
||||
<mimeMap fileExtension=".jar" mimeType="application/java-archive" />
|
||||
<mimeMap fileExtension=".java" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".jck" mimeType="application/liquidmotion" />
|
||||
<mimeMap fileExtension=".jcz" mimeType="application/liquidmotion" />
|
||||
<mimeMap fileExtension=".jfif" mimeType="image/pjpeg" />
|
||||
<mimeMap fileExtension=".jpb" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".jpe" mimeType="image/jpeg" />
|
||||
<mimeMap fileExtension=".jpeg" mimeType="image/jpeg" />
|
||||
<mimeMap fileExtension=".jpg" mimeType="image/jpeg" />
|
||||
<mimeMap fileExtension=".js" mimeType="application/javascript" />
|
||||
<mimeMap fileExtension=".json" mimeType="application/json" />
|
||||
<mimeMap fileExtension=".jsonld" mimeType="application/ld+json" />
|
||||
<mimeMap fileExtension=".jsx" mimeType="text/jscript" />
|
||||
<mimeMap fileExtension=".latex" mimeType="application/x-latex" />
|
||||
<mimeMap fileExtension=".less" mimeType="text/css" />
|
||||
<mimeMap fileExtension=".lit" mimeType="application/x-ms-reader" />
|
||||
<mimeMap fileExtension=".lpk" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".lsf" mimeType="video/x-la-asf" />
|
||||
<mimeMap fileExtension=".lsx" mimeType="video/x-la-asf" />
|
||||
<mimeMap fileExtension=".lzh" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".m13" mimeType="application/x-msmediaview" />
|
||||
<mimeMap fileExtension=".m14" mimeType="application/x-msmediaview" />
|
||||
<mimeMap fileExtension=".m1v" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".m2ts" mimeType="video/vnd.dlna.mpeg-tts" />
|
||||
<mimeMap fileExtension=".m3u" mimeType="audio/x-mpegurl" />
|
||||
<mimeMap fileExtension=".m4a" mimeType="audio/mp4" />
|
||||
<mimeMap fileExtension=".m4v" mimeType="video/mp4" />
|
||||
<mimeMap fileExtension=".man" mimeType="application/x-troff-man" />
|
||||
<mimeMap fileExtension=".manifest" mimeType="application/x-ms-manifest" />
|
||||
<mimeMap fileExtension=".map" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".mdb" mimeType="application/x-msaccess" />
|
||||
<mimeMap fileExtension=".mdp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".me" mimeType="application/x-troff-me" />
|
||||
<mimeMap fileExtension=".mht" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".mhtml" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".mid" mimeType="audio/mid" />
|
||||
<mimeMap fileExtension=".midi" mimeType="audio/mid" />
|
||||
<mimeMap fileExtension=".mix" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".mmf" mimeType="application/x-smaf" />
|
||||
<mimeMap fileExtension=".mno" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".mny" mimeType="application/x-msmoney" />
|
||||
<mimeMap fileExtension=".mov" mimeType="video/quicktime" />
|
||||
<mimeMap fileExtension=".movie" mimeType="video/x-sgi-movie" />
|
||||
<mimeMap fileExtension=".mp2" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />
|
||||
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
|
||||
<mimeMap fileExtension=".mp4v" mimeType="video/mp4" />
|
||||
<mimeMap fileExtension=".mpa" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpe" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpeg" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpg" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpp" mimeType="application/vnd.ms-project" />
|
||||
<mimeMap fileExtension=".mpv2" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".ms" mimeType="application/x-troff-ms" />
|
||||
<mimeMap fileExtension=".msi" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".mso" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".mvb" mimeType="application/x-msmediaview" />
|
||||
<mimeMap fileExtension=".mvc" mimeType="application/x-miva-compiled" />
|
||||
<mimeMap fileExtension=".nc" mimeType="application/x-netcdf" />
|
||||
<mimeMap fileExtension=".nsc" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".nws" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".ocx" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".oda" mimeType="application/oda" />
|
||||
<mimeMap fileExtension=".odc" mimeType="text/x-ms-odc" />
|
||||
<mimeMap fileExtension=".ods" mimeType="application/oleobject" />
|
||||
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
|
||||
<mimeMap fileExtension=".ogg" mimeType="video/ogg" />
|
||||
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
|
||||
<mimeMap fileExtension=".one" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onea" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onetoc" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onetoc2" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onetmp" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onepkg" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".osdx" mimeType="application/opensearchdescription+xml" />
|
||||
<mimeMap fileExtension=".otf" mimeType="font/otf" />
|
||||
<mimeMap fileExtension=".p10" mimeType="application/pkcs10" />
|
||||
<mimeMap fileExtension=".p12" mimeType="application/x-pkcs12" />
|
||||
<mimeMap fileExtension=".p7b" mimeType="application/x-pkcs7-certificates" />
|
||||
<mimeMap fileExtension=".p7c" mimeType="application/pkcs7-mime" />
|
||||
<mimeMap fileExtension=".p7m" mimeType="application/pkcs7-mime" />
|
||||
<mimeMap fileExtension=".p7r" mimeType="application/x-pkcs7-certreqresp" />
|
||||
<mimeMap fileExtension=".p7s" mimeType="application/pkcs7-signature" />
|
||||
<mimeMap fileExtension=".pbm" mimeType="image/x-portable-bitmap" />
|
||||
<mimeMap fileExtension=".pcx" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pcz" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pdf" mimeType="application/pdf" />
|
||||
<mimeMap fileExtension=".pfb" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pfm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pfx" mimeType="application/x-pkcs12" />
|
||||
<mimeMap fileExtension=".pgm" mimeType="image/x-portable-graymap" />
|
||||
<mimeMap fileExtension=".pko" mimeType="application/vnd.ms-pki.pko" />
|
||||
<mimeMap fileExtension=".pma" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pmc" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pml" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pmr" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pmw" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".png" mimeType="image/png" />
|
||||
<mimeMap fileExtension=".pnm" mimeType="image/x-portable-anymap" />
|
||||
<mimeMap fileExtension=".pnz" mimeType="image/png" />
|
||||
<mimeMap fileExtension=".pot" mimeType="application/vnd.ms-powerpoint" />
|
||||
<mimeMap fileExtension=".potm" mimeType="application/vnd.ms-powerpoint.template.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".potx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.template" />
|
||||
<mimeMap fileExtension=".ppam" mimeType="application/vnd.ms-powerpoint.addin.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".ppm" mimeType="image/x-portable-pixmap" />
|
||||
<mimeMap fileExtension=".pps" mimeType="application/vnd.ms-powerpoint" />
|
||||
<mimeMap fileExtension=".ppsm" mimeType="application/vnd.ms-powerpoint.slideshow.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".ppsx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.slideshow" />
|
||||
<mimeMap fileExtension=".ppt" mimeType="application/vnd.ms-powerpoint" />
|
||||
<mimeMap fileExtension=".pptm" mimeType="application/vnd.ms-powerpoint.presentation.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".pptx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" />
|
||||
<mimeMap fileExtension=".prf" mimeType="application/pics-rules" />
|
||||
<mimeMap fileExtension=".prm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".prx" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ps" mimeType="application/postscript" />
|
||||
<mimeMap fileExtension=".psd" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".psm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".psp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pub" mimeType="application/x-mspublisher" />
|
||||
<mimeMap fileExtension=".qt" mimeType="video/quicktime" />
|
||||
<mimeMap fileExtension=".qtl" mimeType="application/x-quicktimeplayer" />
|
||||
<mimeMap fileExtension=".qxd" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ra" mimeType="audio/x-pn-realaudio" />
|
||||
<mimeMap fileExtension=".ram" mimeType="audio/x-pn-realaudio" />
|
||||
<mimeMap fileExtension=".rar" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ras" mimeType="image/x-cmu-raster" />
|
||||
<mimeMap fileExtension=".rf" mimeType="image/vnd.rn-realflash" />
|
||||
<mimeMap fileExtension=".rgb" mimeType="image/x-rgb" />
|
||||
<mimeMap fileExtension=".rm" mimeType="application/vnd.rn-realmedia" />
|
||||
<mimeMap fileExtension=".rmi" mimeType="audio/mid" />
|
||||
<mimeMap fileExtension=".roff" mimeType="application/x-troff" />
|
||||
<mimeMap fileExtension=".rpm" mimeType="audio/x-pn-realaudio-plugin" />
|
||||
<mimeMap fileExtension=".rtf" mimeType="application/rtf" />
|
||||
<mimeMap fileExtension=".rtx" mimeType="text/richtext" />
|
||||
<mimeMap fileExtension=".scd" mimeType="application/x-msschedule" />
|
||||
<mimeMap fileExtension=".sct" mimeType="text/scriptlet" />
|
||||
<mimeMap fileExtension=".sea" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".setpay" mimeType="application/set-payment-initiation" />
|
||||
<mimeMap fileExtension=".setreg" mimeType="application/set-registration-initiation" />
|
||||
<mimeMap fileExtension=".sgml" mimeType="text/sgml" />
|
||||
<mimeMap fileExtension=".sh" mimeType="application/x-sh" />
|
||||
<mimeMap fileExtension=".shar" mimeType="application/x-shar" />
|
||||
<mimeMap fileExtension=".sit" mimeType="application/x-stuffit" />
|
||||
<mimeMap fileExtension=".sldm" mimeType="application/vnd.ms-powerpoint.slide.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".sldx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.slide" />
|
||||
<mimeMap fileExtension=".smd" mimeType="audio/x-smd" />
|
||||
<mimeMap fileExtension=".smi" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".smx" mimeType="audio/x-smd" />
|
||||
<mimeMap fileExtension=".smz" mimeType="audio/x-smd" />
|
||||
<mimeMap fileExtension=".snd" mimeType="audio/basic" />
|
||||
<mimeMap fileExtension=".snp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".spc" mimeType="application/x-pkcs7-certificates" />
|
||||
<mimeMap fileExtension=".spl" mimeType="application/futuresplash" />
|
||||
<mimeMap fileExtension=".spx" mimeType="audio/ogg" />
|
||||
<mimeMap fileExtension=".src" mimeType="application/x-wais-source" />
|
||||
<mimeMap fileExtension=".ssm" mimeType="application/streamingmedia" />
|
||||
<mimeMap fileExtension=".sst" mimeType="application/vnd.ms-pki.certstore" />
|
||||
<mimeMap fileExtension=".stl" mimeType="application/vnd.ms-pki.stl" />
|
||||
<mimeMap fileExtension=".sv4cpio" mimeType="application/x-sv4cpio" />
|
||||
<mimeMap fileExtension=".sv4crc" mimeType="application/x-sv4crc" />
|
||||
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
|
||||
<mimeMap fileExtension=".svgz" mimeType="image/svg+xml" />
|
||||
<mimeMap fileExtension=".swf" mimeType="application/x-shockwave-flash" />
|
||||
<mimeMap fileExtension=".t" mimeType="application/x-troff" />
|
||||
<mimeMap fileExtension=".tar" mimeType="application/x-tar" />
|
||||
<mimeMap fileExtension=".tcl" mimeType="application/x-tcl" />
|
||||
<mimeMap fileExtension=".tex" mimeType="application/x-tex" />
|
||||
<mimeMap fileExtension=".texi" mimeType="application/x-texinfo" />
|
||||
<mimeMap fileExtension=".texinfo" mimeType="application/x-texinfo" />
|
||||
<mimeMap fileExtension=".tgz" mimeType="application/x-compressed" />
|
||||
<mimeMap fileExtension=".thmx" mimeType="application/vnd.ms-officetheme" />
|
||||
<mimeMap fileExtension=".thn" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".tif" mimeType="image/tiff" />
|
||||
<mimeMap fileExtension=".tiff" mimeType="image/tiff" />
|
||||
<mimeMap fileExtension=".toc" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".tr" mimeType="application/x-troff" />
|
||||
<mimeMap fileExtension=".trm" mimeType="application/x-msterminal" />
|
||||
<mimeMap fileExtension=".ts" mimeType="video/vnd.dlna.mpeg-tts" />
|
||||
<mimeMap fileExtension=".tsv" mimeType="text/tab-separated-values" />
|
||||
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".tts" mimeType="video/vnd.dlna.mpeg-tts" />
|
||||
<mimeMap fileExtension=".txt" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".u32" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".uls" mimeType="text/iuls" />
|
||||
<mimeMap fileExtension=".ustar" mimeType="application/x-ustar" />
|
||||
<mimeMap fileExtension=".vbs" mimeType="text/vbscript" />
|
||||
<mimeMap fileExtension=".vcf" mimeType="text/x-vcard" />
|
||||
<mimeMap fileExtension=".vcs" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".vdx" mimeType="application/vnd.ms-visio.viewer" />
|
||||
<mimeMap fileExtension=".vml" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".vsd" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vss" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vst" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vsto" mimeType="application/x-ms-vsto" />
|
||||
<mimeMap fileExtension=".vsw" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vsx" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vtx" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
|
||||
<mimeMap fileExtension=".wav" mimeType="audio/wav" />
|
||||
<mimeMap fileExtension=".wax" mimeType="audio/x-ms-wax" />
|
||||
<mimeMap fileExtension=".wbmp" mimeType="image/vnd.wap.wbmp" />
|
||||
<mimeMap fileExtension=".wcm" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".wdb" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".webm" mimeType="video/webm" />
|
||||
<mimeMap fileExtension=".wks" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".wm" mimeType="video/x-ms-wm" />
|
||||
<mimeMap fileExtension=".wma" mimeType="audio/x-ms-wma" />
|
||||
<mimeMap fileExtension=".wmd" mimeType="application/x-ms-wmd" />
|
||||
<mimeMap fileExtension=".wmf" mimeType="application/x-msmetafile" />
|
||||
<mimeMap fileExtension=".wml" mimeType="text/vnd.wap.wml" />
|
||||
<mimeMap fileExtension=".wmlc" mimeType="application/vnd.wap.wmlc" />
|
||||
<mimeMap fileExtension=".wmls" mimeType="text/vnd.wap.wmlscript" />
|
||||
<mimeMap fileExtension=".wmlsc" mimeType="application/vnd.wap.wmlscriptc" />
|
||||
<mimeMap fileExtension=".wmp" mimeType="video/x-ms-wmp" />
|
||||
<mimeMap fileExtension=".wmv" mimeType="video/x-ms-wmv" />
|
||||
<mimeMap fileExtension=".wmx" mimeType="video/x-ms-wmx" />
|
||||
<mimeMap fileExtension=".wmz" mimeType="application/x-ms-wmz" />
|
||||
<mimeMap fileExtension=".woff" mimeType="font/x-woff" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
|
||||
<mimeMap fileExtension=".wps" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".wri" mimeType="application/x-mswrite" />
|
||||
<mimeMap fileExtension=".wrl" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".wrz" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".wsdl" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".wtv" mimeType="video/x-ms-wtv" />
|
||||
<mimeMap fileExtension=".wvx" mimeType="video/x-ms-wvx" />
|
||||
<mimeMap fileExtension=".x" mimeType="application/directx" />
|
||||
<mimeMap fileExtension=".xaf" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".xaml" mimeType="application/xaml+xml" />
|
||||
<mimeMap fileExtension=".xap" mimeType="application/x-silverlight-app" />
|
||||
<mimeMap fileExtension=".xbap" mimeType="application/x-ms-xbap" />
|
||||
<mimeMap fileExtension=".xbm" mimeType="image/x-xbitmap" />
|
||||
<mimeMap fileExtension=".xdr" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".xht" mimeType="application/xhtml+xml" />
|
||||
<mimeMap fileExtension=".xhtml" mimeType="application/xhtml+xml" />
|
||||
<mimeMap fileExtension=".xla" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xlam" mimeType="application/vnd.ms-excel.addin.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xlc" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xlm" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xls" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xlsb" mimeType="application/vnd.ms-excel.sheet.binary.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xlsm" mimeType="application/vnd.ms-excel.sheet.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xlsx" mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
|
||||
<mimeMap fileExtension=".xlt" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xltm" mimeType="application/vnd.ms-excel.template.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xltx" mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.template" />
|
||||
<mimeMap fileExtension=".xlw" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xml" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xof" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".xpm" mimeType="image/x-xpixmap" />
|
||||
<mimeMap fileExtension=".xps" mimeType="application/vnd.ms-xpsdocument" />
|
||||
<mimeMap fileExtension=".xsd" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xsf" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xsl" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xslt" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xsn" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".xtp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".xwd" mimeType="image/x-xwindowdump" />
|
||||
<mimeMap fileExtension=".z" mimeType="application/x-compress" />
|
||||
<mimeMap fileExtension=".zip" mimeType="application/x-zip-compressed" />
|
||||
</staticContent>
|
||||
<tracing>
|
||||
<traceFailedRequests>
|
||||
<add path="*">
|
||||
<traceAreas>
|
||||
<add provider="ASP" verbosity="Verbose" />
|
||||
<add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
|
||||
<add provider="ISAPI Extension" verbosity="Verbose" />
|
||||
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,Rewrite,WebSocket" verbosity="Verbose" />
|
||||
</traceAreas>
|
||||
<failureDefinitions statusCodes="200-999" />
|
||||
</add>
|
||||
</traceFailedRequests>
|
||||
<traceProviderDefinitions>
|
||||
<add name="WWW Server" guid="{3a2a4e84-4c21-4981-ae10-3fda0d9b0f83}">
|
||||
<areas>
|
||||
<clear />
|
||||
<add name="Authentication" value="2" />
|
||||
<add name="Security" value="4" />
|
||||
<add name="Filter" value="8" />
|
||||
<add name="StaticFile" value="16" />
|
||||
<add name="CGI" value="32" />
|
||||
<add name="Compression" value="64" />
|
||||
<add name="Cache" value="128" />
|
||||
<add name="RequestNotifications" value="256" />
|
||||
<add name="Module" value="512" />
|
||||
<add name="Rewrite" value="1024" />
|
||||
<add name="FastCGI" value="4096" />
|
||||
<add name="WebSocket" value="16384" />
|
||||
</areas>
|
||||
</add>
|
||||
<add name="ASP" guid="{06b94d9a-b15e-456e-a4ef-37c984a2cb4b}">
|
||||
<areas>
|
||||
<clear />
|
||||
</areas>
|
||||
</add>
|
||||
<add name="ISAPI Extension" guid="{a1c2040e-8840-4c31-ba11-9871031a19ea}">
|
||||
<areas>
|
||||
<clear />
|
||||
</areas>
|
||||
</add>
|
||||
<add name="ASPNET" guid="{AFF081FE-0247-4275-9C4E-021F3DC1DA35}">
|
||||
<areas>
|
||||
<add name="Infrastructure" value="1" />
|
||||
<add name="Module" value="2" />
|
||||
<add name="Page" value="4" />
|
||||
<add name="AppServices" value="8" />
|
||||
</areas>
|
||||
</add>
|
||||
</traceProviderDefinitions>
|
||||
</tracing>
|
||||
<urlCompression />
|
||||
<validation />
|
||||
<webdav>
|
||||
<globalSettings>
|
||||
<propertyStores>
|
||||
<add name="webdav_simple_prop" image="%IIS_BIN%\webdav_simple_prop.dll" image32="%IIS_BIN%\webdav_simple_prop.dll" />
|
||||
</propertyStores>
|
||||
<lockStores>
|
||||
<add name="webdav_simple_lock" image="%IIS_BIN%\webdav_simple_lock.dll" image32="%IIS_BIN%\webdav_simple_lock.dll" />
|
||||
</lockStores>
|
||||
</globalSettings>
|
||||
<authoring>
|
||||
<locks enabled="true" lockStore="webdav_simple_lock" />
|
||||
</authoring>
|
||||
<authoringRules />
|
||||
</webdav>
|
||||
<webSocket />
|
||||
<applicationInitialization />
|
||||
</system.webServer>
|
||||
<location path="" overrideMode="Allow">
|
||||
<system.webServer>
|
||||
<modules>
|
||||
<add name="IsapiFilterModule" lockItem="true" />
|
||||
<add name="BasicAuthenticationModule" lockItem="true" />
|
||||
<add name="IsapiModule" lockItem="true" />
|
||||
<add name="HttpLoggingModule" lockItem="true" />
|
||||
<add name="DynamicCompressionModule" lockItem="true" />
|
||||
<add name="StaticCompressionModule" lockItem="true" />
|
||||
<add name="DefaultDocumentModule" lockItem="true" />
|
||||
<add name="DirectoryListingModule" lockItem="true" />
|
||||
<add name="ProtocolSupportModule" lockItem="true" />
|
||||
<add name="HttpRedirectionModule" lockItem="true" />
|
||||
<add name="ServerSideIncludeModule" lockItem="true" />
|
||||
<add name="StaticFileModule" lockItem="true" />
|
||||
<add name="AnonymousAuthenticationModule" lockItem="true" />
|
||||
<add name="CertificateMappingAuthenticationModule" lockItem="true" />
|
||||
<add name="UrlAuthorizationModule" lockItem="true" />
|
||||
<add name="WindowsAuthenticationModule" lockItem="true" />
|
||||
<add name="IISCertificateMappingAuthenticationModule" lockItem="true" />
|
||||
<add name="WebMatrixSupportModule" lockItem="true" />
|
||||
<add name="IpRestrictionModule" lockItem="true" />
|
||||
<add name="DynamicIpRestrictionModule" lockItem="true" />
|
||||
<add name="RequestFilteringModule" lockItem="true" />
|
||||
<add name="CustomLoggingModule" lockItem="true" />
|
||||
<add name="CustomErrorModule" lockItem="true" />
|
||||
<add name="FailedRequestsTracingModule" lockItem="true" />
|
||||
<add name="CgiModule" lockItem="true" />
|
||||
<add name="FastCgiModule" lockItem="true" />
|
||||
<!-- <add name="WebDAVModule" /> -->
|
||||
<add name="RewriteModule" />
|
||||
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" preCondition="managedHandler" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="managedHandler" />
|
||||
<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" preCondition="managedHandler" />
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="managedHandler" />
|
||||
<add name="DefaultAuthentication" type="System.Web.Security.DefaultAuthenticationModule" preCondition="managedHandler" />
|
||||
<add name="RoleManager" type="System.Web.Security.RoleManagerModule" preCondition="managedHandler" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" preCondition="managedHandler" />
|
||||
<add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" preCondition="managedHandler" />
|
||||
<add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule" preCondition="managedHandler" />
|
||||
<add name="Profile" type="System.Web.Profile.ProfileModule" preCondition="managedHandler" />
|
||||
<add name="UrlMappingsModule" type="System.Web.UrlMappingsModule" preCondition="managedHandler" />
|
||||
<add name="ApplicationInitializationModule" lockItem="true" />
|
||||
<add name="WebSocketModule" lockItem="true" />
|
||||
<add name="ServiceModel-4.0" type="System.ServiceModel.Activation.ServiceHttpModule,System.ServiceModel.Activation,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="ConfigurationValidationModule" lockItem="true" />
|
||||
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
</modules>
|
||||
<handlers accessPolicy="Read, Script">
|
||||
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
|
||||
<add name="AXD-ISAPI-4.0_64bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-4.0_64bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-4.0_64bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-4.0_64bit" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-4.0_64bit" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-4.0_64bit" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="svc-ISAPI-4.0_64bit" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="rules-ISAPI-4.0_64bit" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="xoml-ISAPI-4.0_64bit" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="xamlx-ISAPI-4.0_64bit" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="aspq-ISAPI-4.0_64bit" path="*.aspq" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="cshtm-ISAPI-4.0_64bit" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="cshtml-ISAPI-4.0_64bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="vbhtm-ISAPI-4.0_64bit" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="vbhtml-ISAPI-4.0_64bit" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="AXD-ISAPI-4.0_32bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-4.0_32bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-4.0_32bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-4.0_32bit" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-4.0_32bit" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-4.0_32bit" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="svc-ISAPI-4.0_32bit" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="rules-ISAPI-4.0_32bit" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="xoml-ISAPI-4.0_32bit" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="xamlx-ISAPI-4.0_32bit" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="aspq-ISAPI-4.0_32bit" path="*.aspq" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="cshtm-ISAPI-4.0_32bit" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="cshtml-ISAPI-4.0_32bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="vbhtm-ISAPI-4.0_32bit" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="vbhtml-ISAPI-4.0_32bit" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="TraceHandler-Integrated-4.0" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="WebAdminHandler-Integrated-4.0" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="AssemblyResourceLoader-Integrated-4.0" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="PageHandlerFactory-Integrated-4.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="SimpleHandlerFactory-Integrated-4.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="WebServiceHandlerFactory-Integrated-4.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-Integrated-4.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-Integrated-4.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="rules-Integrated-4.0" path="*.rules" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="xoml-Integrated-4.0" path="*.xoml" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="xamlx-Integrated-4.0" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" type="System.Xaml.Hosting.XamlHttpHandlerFactory, System.Xaml.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="aspq-Integrated-4.0" path="*.aspq" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="cshtm-Integrated-4.0" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="cshtml-Integrated-4.0" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="vbhtm-Integrated-4.0" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="vbhtml-Integrated-4.0" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="ScriptHandlerFactoryAppServices-Integrated-4.0" path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="ScriptResourceIntegrated-4.0" path="*ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="ASPClassic" path="*.asp" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%IIS_BIN%\asp.dll" resourceType="File" />
|
||||
<add name="SecurityCertificate" path="*.cer" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%IIS_BIN%\asp.dll" resourceType="File" />
|
||||
<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
|
||||
<add name="TraceHandler-Integrated" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="WebAdminHandler-Integrated" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="AssemblyResourceLoader-Integrated" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="WebServiceHandlerFactory-Integrated" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Services.Protocols.WebServiceHandlerFactory,System.Web.Services,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-Integrated" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,System.Runtime.Remoting,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-Integrated" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,System.Runtime.Remoting,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="AXD-ISAPI-2.0" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-2.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="AXD-ISAPI-2.0-64" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-2.0-64" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-2.0-64" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-2.0-64" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0-64" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0-64" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="CGI-exe" path="*.exe" verb="*" modules="CgiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
|
||||
<add name="SSINC-stm" path="*.stm" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" />
|
||||
<add name="SSINC-shtm" path="*.shtm" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" />
|
||||
<add name="SSINC-shtml" path="*.shtml" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" />
|
||||
<add name="TRACEVerbHandler" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" />
|
||||
<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" />
|
||||
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</location>
|
||||
</configuration>
|
BIN
.vs/Samples_VS2022/v17/.suo
Normal file
BIN
.vs/Samples_VS2022/v17/.suo
Normal file
Binary file not shown.
BIN
.vs/Samples_VS2022/v17/Browse.VC.db
Normal file
BIN
.vs/Samples_VS2022/v17/Browse.VC.db
Normal file
Binary file not shown.
BIN
.vs/Samples_VS2022/v17/Browse.VC.db-shm
Normal file
BIN
.vs/Samples_VS2022/v17/Browse.VC.db-shm
Normal file
Binary file not shown.
0
.vs/Samples_VS2022/v17/Browse.VC.db-wal
Normal file
0
.vs/Samples_VS2022/v17/Browse.VC.db-wal
Normal file
BIN
.vs/Samples_VS2022/v17/Solution.VC.db
Normal file
BIN
.vs/Samples_VS2022/v17/Solution.VC.db
Normal file
Binary file not shown.
BIN
.vs/Samples_VS2022/v17/Solution.VC.db-shm
Normal file
BIN
.vs/Samples_VS2022/v17/Solution.VC.db-shm
Normal file
Binary file not shown.
BIN
.vs/Samples_VS2022/v17/Solution.VC.db-wal
Normal file
BIN
.vs/Samples_VS2022/v17/Solution.VC.db-wal
Normal file
Binary file not shown.
6
.vs/VSWorkspaceState.json
Normal file
6
.vs/VSWorkspaceState.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
959
.vs/cuda-samples/config/applicationhost.config
Normal file
959
.vs/cuda-samples/config/applicationhost.config
Normal file
|
@ -0,0 +1,959 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
IIS configuration sections.
|
||||
|
||||
For schema documentation, see
|
||||
%IIS_BIN%\config\schema\IIS_schema.xml.
|
||||
|
||||
Please make a backup of this file before making any changes to it.
|
||||
|
||||
NOTE: The following environment variables are available to be used
|
||||
within this file and are understood by the IIS Express.
|
||||
|
||||
%IIS_USER_HOME% - The IIS Express home directory for the user
|
||||
%IIS_SITES_HOME% - The default home directory for sites
|
||||
%IIS_BIN% - The location of the IIS Express binaries
|
||||
%SYSTEMDRIVE% - The drive letter of %IIS_BIN%
|
||||
|
||||
-->
|
||||
<configuration>
|
||||
<!--
|
||||
|
||||
The <configSections> section controls the registration of sections.
|
||||
Section is the basic unit of deployment, locking, searching and
|
||||
containment for configuration settings.
|
||||
|
||||
Every section belongs to one section group.
|
||||
A section group is a container of logically-related sections.
|
||||
|
||||
Sections cannot be nested.
|
||||
Section groups may be nested.
|
||||
|
||||
<section
|
||||
name="" [Required, Collection Key] [XML name of the section]
|
||||
allowDefinition="Everywhere" [MachineOnly|MachineToApplication|AppHostOnly|Everywhere] [Level where it can be set]
|
||||
overrideModeDefault="Allow" [Allow|Deny] [Default delegation mode]
|
||||
allowLocation="true" [true|false] [Allowed in location tags]
|
||||
/>
|
||||
|
||||
The recommended way to unlock sections is by using a location tag:
|
||||
<location path="Default Web Site" overrideMode="Allow">
|
||||
<system.webServer>
|
||||
<asp />
|
||||
</system.webServer>
|
||||
</location>
|
||||
|
||||
-->
|
||||
<configSections>
|
||||
<sectionGroup name="system.applicationHost">
|
||||
<section name="applicationPools" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="configHistory" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="customMetadata" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="listenerAdapters" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="log" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="serviceAutoStartProviders" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="sites" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="webLimits" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.webServer">
|
||||
<section name="asp" overrideModeDefault="Deny" />
|
||||
<section name="caching" overrideModeDefault="Allow" />
|
||||
<section name="cgi" overrideModeDefault="Deny" />
|
||||
<section name="defaultDocument" overrideModeDefault="Allow" />
|
||||
<section name="directoryBrowse" overrideModeDefault="Allow" />
|
||||
<section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="globalModules" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="handlers" overrideModeDefault="Deny" />
|
||||
<section name="httpCompression" overrideModeDefault="Allow" allowDefinition="Everywhere" />
|
||||
<section name="httpErrors" overrideModeDefault="Allow" />
|
||||
<section name="httpLogging" overrideModeDefault="Deny" />
|
||||
<section name="httpProtocol" overrideModeDefault="Allow" />
|
||||
<section name="httpRedirect" overrideModeDefault="Allow" />
|
||||
<section name="httpTracing" overrideModeDefault="Deny" />
|
||||
<section name="isapiFilters" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
|
||||
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
|
||||
<section name="applicationInitialization" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
|
||||
<section name="odbcLogging" overrideModeDefault="Deny" />
|
||||
<sectionGroup name="security">
|
||||
<section name="access" overrideModeDefault="Deny" />
|
||||
<section name="applicationDependencies" overrideModeDefault="Deny" />
|
||||
<sectionGroup name="authentication">
|
||||
<section name="anonymousAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="basicAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="clientCertificateMappingAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="digestAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Deny" />
|
||||
<section name="windowsAuthentication" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<section name="authorization" overrideModeDefault="Allow" />
|
||||
<section name="ipSecurity" overrideModeDefault="Deny" />
|
||||
<section name="dynamicIpSecurity" overrideModeDefault="Deny" />
|
||||
<section name="isapiCgiRestriction" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="requestFiltering" overrideModeDefault="Allow" />
|
||||
</sectionGroup>
|
||||
<section name="serverRuntime" overrideModeDefault="Deny" />
|
||||
<section name="serverSideInclude" overrideModeDefault="Deny" />
|
||||
<section name="staticContent" overrideModeDefault="Allow" />
|
||||
<sectionGroup name="tracing">
|
||||
<section name="traceFailedRequests" overrideModeDefault="Allow" />
|
||||
<section name="traceProviderDefinitions" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<section name="urlCompression" overrideModeDefault="Allow" />
|
||||
<section name="validation" overrideModeDefault="Allow" />
|
||||
<sectionGroup name="webdav">
|
||||
<section name="globalSettings" overrideModeDefault="Deny" />
|
||||
<section name="authoring" overrideModeDefault="Deny" />
|
||||
<section name="authoringRules" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="rewrite">
|
||||
<section name="allowedServerVariables" overrideModeDefault="Deny" />
|
||||
<section name="rules" overrideModeDefault="Allow" />
|
||||
<section name="outboundRules" overrideModeDefault="Allow" />
|
||||
<section name="globalRules" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
|
||||
<section name="providers" overrideModeDefault="Allow" />
|
||||
<section name="rewriteMaps" overrideModeDefault="Allow" />
|
||||
</sectionGroup>
|
||||
<section name="webSocket" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<configProtectedData>
|
||||
<providers>
|
||||
<add name="IISWASOnlyRsaProvider" type="" description="Uses RsaCryptoServiceProvider to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
|
||||
<add name="AesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisConfigurationKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="AQIAAA5mAAAApAAA/HKxkz6alrlAPez0IUgujj/6k3WxCDriHp6jvpv3yEZmo7h6SMzGLxo4mTrIQVHSkB7tmElHKfUFTzE2BWF7nFWHY6Z6qmGBauFzwJMwESjril7Gjz69RBFH259HQ6aRDq9Xfx7U7H4HtdmnKNqGjgl/hwPQBGeIlWiDh+sYv3vKB0QU971tjX6H2B+9armlnC8UOuA6JYMDMI/VLLL16sng0fWAy5JYe0YVABVjiAWDW264RZW9Tr1Oax4qHZKg+SdjULxeOc2YmpX+d0yeITo1HkPF1hN1gHpIPIUDo05ilHUNfR3OkjVCIQK4cFKCq1s8NH+y+13MxUC4Fn1AlQ==" />
|
||||
<add name="IISWASOnlyAesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="AQIAAA5mAAAApAAALmU8lTC+v2qtfQiiiquvvLpUQqKLEXs+jSKoWCM/uPhyB++k4dwug19mGidNK5FYiWK2KYE1yhjVJcbp12E98Q0R2nT7eBiCMY2JairxQ591rqABK7keGaIjwH7PwGzSpILl3RJ4YFvJ/7ZXEJxeDZIjW8ZxWVXx+/VyHs9U3WguLEkgMUX3jrxJi8LouxaIVPJAv/YQ1ZCWs8zImitxX/C/7o7yaIxznfsN5nGQzQfpUDPeby99aw2zPVTtZI2LaWIBON8guABvZ6JtJVDWmfdK6sodbnwdZkr6/Z2rfvamT1dC1SpQrGG7ulR/f9/GXvCaW10ZVKxekBF/CYlNMg==" />
|
||||
</providers>
|
||||
</configProtectedData>
|
||||
<system.applicationHost>
|
||||
<applicationPools>
|
||||
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" />
|
||||
<applicationPoolDefaults managedRuntimeVersion="v4.0">
|
||||
<processModel loadUserProfile="true" setProfileEnvironment="false" />
|
||||
</applicationPoolDefaults>
|
||||
</applicationPools>
|
||||
<!--
|
||||
|
||||
The <listenerAdapters> section defines the protocols with which the
|
||||
Windows Process Activation Service (WAS) binds.
|
||||
|
||||
-->
|
||||
<listenerAdapters>
|
||||
<add name="http" />
|
||||
</listenerAdapters>
|
||||
<sites>
|
||||
<site name="WebSite1" id="1" serverAutoStart="true">
|
||||
<application path="/">
|
||||
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation=":8080:localhost" />
|
||||
</bindings>
|
||||
</site>
|
||||
<siteDefaults>
|
||||
<!-- To enable logging, please change the below attribute "enabled" to "true" -->
|
||||
<logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" />
|
||||
<traceFailedRequestsLogging directory="%AppData%\Microsoft" enabled="false" maxLogFileSizeKB="1024" />
|
||||
</siteDefaults>
|
||||
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
|
||||
<virtualDirectoryDefaults allowSubDirConfig="true" />
|
||||
</sites>
|
||||
<webLimits />
|
||||
</system.applicationHost>
|
||||
<system.webServer>
|
||||
<serverRuntime />
|
||||
<asp scriptErrorSentToBrowser="true">
|
||||
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
|
||||
<limits />
|
||||
</asp>
|
||||
<caching enabled="true" enableKernelCache="true">
|
||||
</caching>
|
||||
<cgi />
|
||||
<defaultDocument enabled="true">
|
||||
<files>
|
||||
<add value="Default.htm" />
|
||||
<add value="Default.asp" />
|
||||
<add value="index.htm" />
|
||||
<add value="index.html" />
|
||||
<add value="iisstart.htm" />
|
||||
<add value="default.aspx" />
|
||||
</files>
|
||||
</defaultDocument>
|
||||
<directoryBrowse enabled="false" />
|
||||
<fastCgi />
|
||||
<!--
|
||||
|
||||
The <globalModules> section defines all native-code modules.
|
||||
To enable a module, specify it in the <modules> section.
|
||||
|
||||
-->
|
||||
<globalModules>
|
||||
<add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" />
|
||||
<add name="UriCacheModule" image="%IIS_BIN%\cachuri.dll" />
|
||||
<add name="TokenCacheModule" image="%IIS_BIN%\cachtokn.dll" />
|
||||
<add name="DynamicCompressionModule" image="%IIS_BIN%\compdyn.dll" />
|
||||
<add name="StaticCompressionModule" image="%IIS_BIN%\compstat.dll" />
|
||||
<add name="DefaultDocumentModule" image="%IIS_BIN%\defdoc.dll" />
|
||||
<add name="DirectoryListingModule" image="%IIS_BIN%\dirlist.dll" />
|
||||
<add name="ProtocolSupportModule" image="%IIS_BIN%\protsup.dll" />
|
||||
<add name="HttpRedirectionModule" image="%IIS_BIN%\redirect.dll" />
|
||||
<add name="ServerSideIncludeModule" image="%IIS_BIN%\iis_ssi.dll" />
|
||||
<add name="StaticFileModule" image="%IIS_BIN%\static.dll" />
|
||||
<add name="AnonymousAuthenticationModule" image="%IIS_BIN%\authanon.dll" />
|
||||
<add name="CertificateMappingAuthenticationModule" image="%IIS_BIN%\authcert.dll" />
|
||||
<add name="UrlAuthorizationModule" image="%IIS_BIN%\urlauthz.dll" />
|
||||
<add name="BasicAuthenticationModule" image="%IIS_BIN%\authbas.dll" />
|
||||
<add name="WindowsAuthenticationModule" image="%IIS_BIN%\authsspi.dll" />
|
||||
<add name="IISCertificateMappingAuthenticationModule" image="%IIS_BIN%\authmap.dll" />
|
||||
<add name="IpRestrictionModule" image="%IIS_BIN%\iprestr.dll" />
|
||||
<add name="DynamicIpRestrictionModule" image="%IIS_BIN%\diprestr.dll" />
|
||||
<add name="RequestFilteringModule" image="%IIS_BIN%\modrqflt.dll" />
|
||||
<add name="CustomLoggingModule" image="%IIS_BIN%\logcust.dll" />
|
||||
<add name="CustomErrorModule" image="%IIS_BIN%\custerr.dll" />
|
||||
<add name="FailedRequestsTracingModule" image="%IIS_BIN%\iisfreb.dll" />
|
||||
<add name="RequestMonitorModule" image="%IIS_BIN%\iisreqs.dll" />
|
||||
<add name="IsapiModule" image="%IIS_BIN%\isapi.dll" />
|
||||
<add name="IsapiFilterModule" image="%IIS_BIN%\filter.dll" />
|
||||
<add name="CgiModule" image="%IIS_BIN%\cgi.dll" />
|
||||
<add name="FastCgiModule" image="%IIS_BIN%\iisfcgi.dll" />
|
||||
<!-- <add name="WebDAVModule" image="%IIS_BIN%\webdav.dll" /> -->
|
||||
<add name="RewriteModule" image="%IIS_BIN%\rewrite.dll" />
|
||||
<add name="ConfigurationValidationModule" image="%IIS_BIN%\validcfg.dll" />
|
||||
<add name="WebSocketModule" image="%IIS_BIN%\iiswsock.dll" />
|
||||
<add name="WebMatrixSupportModule" image="%IIS_BIN%\webmatrixsup.dll" />
|
||||
<add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />
|
||||
<add name="ManagedEngine64" image="%windir%\Microsoft.NET\Framework64\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness64" />
|
||||
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" />
|
||||
</globalModules>
|
||||
<httpCompression directory="%TEMP%">
|
||||
<scheme name="gzip" dll="%IIS_BIN%\gzip.dll" />
|
||||
<dynamicTypes>
|
||||
<add mimeType="text/*" enabled="true" />
|
||||
<add mimeType="message/*" enabled="true" />
|
||||
<add mimeType="application/x-javascript" enabled="true" />
|
||||
<add mimeType="application/javascript" enabled="true" />
|
||||
<add mimeType="*/*" enabled="false" />
|
||||
<add mimeType="text/event-stream" enabled="false" />
|
||||
</dynamicTypes>
|
||||
<staticTypes>
|
||||
<add mimeType="text/*" enabled="true" />
|
||||
<add mimeType="message/*" enabled="true" />
|
||||
<add mimeType="application/javascript" enabled="true" />
|
||||
<add mimeType="application/atom+xml" enabled="true" />
|
||||
<add mimeType="application/xaml+xml" enabled="true" />
|
||||
<add mimeType="image/svg+xml" enabled="true" />
|
||||
<add mimeType="*/*" enabled="false" />
|
||||
</staticTypes>
|
||||
</httpCompression>
|
||||
<httpErrors lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
|
||||
<error statusCode="401" prefixLanguageFilePath="%IIS_BIN%\custerr" path="401.htm" />
|
||||
<error statusCode="403" prefixLanguageFilePath="%IIS_BIN%\custerr" path="403.htm" />
|
||||
<error statusCode="404" prefixLanguageFilePath="%IIS_BIN%\custerr" path="404.htm" />
|
||||
<error statusCode="405" prefixLanguageFilePath="%IIS_BIN%\custerr" path="405.htm" />
|
||||
<error statusCode="406" prefixLanguageFilePath="%IIS_BIN%\custerr" path="406.htm" />
|
||||
<error statusCode="412" prefixLanguageFilePath="%IIS_BIN%\custerr" path="412.htm" />
|
||||
<error statusCode="500" prefixLanguageFilePath="%IIS_BIN%\custerr" path="500.htm" />
|
||||
<error statusCode="501" prefixLanguageFilePath="%IIS_BIN%\custerr" path="501.htm" />
|
||||
<error statusCode="502" prefixLanguageFilePath="%IIS_BIN%\custerr" path="502.htm" />
|
||||
</httpErrors>
|
||||
<httpLogging dontLog="false" />
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<clear />
|
||||
<add name="X-Powered-By" value="ASP.NET" />
|
||||
</customHeaders>
|
||||
<redirectHeaders>
|
||||
<clear />
|
||||
</redirectHeaders>
|
||||
</httpProtocol>
|
||||
<httpRedirect enabled="false" />
|
||||
<httpTracing />
|
||||
<isapiFilters>
|
||||
<filter name="ASP.Net_2.0.50727-64" path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv2.0" />
|
||||
<filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv2.0" />
|
||||
<filter name="ASP.Net_2.0_for_v1.1" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv1.1" />
|
||||
<filter name="ASP.Net_4.0_32bit" path="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv4.0" />
|
||||
<filter name="ASP.Net_4.0_64bit" path="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv4.0" />
|
||||
</isapiFilters>
|
||||
<odbcLogging />
|
||||
<security>
|
||||
<access sslFlags="None" />
|
||||
<applicationDependencies>
|
||||
<application name="Active Server Pages" groupId="ASP" />
|
||||
</applicationDependencies>
|
||||
<authentication>
|
||||
<anonymousAuthentication enabled="true" userName="" />
|
||||
<basicAuthentication enabled="false" />
|
||||
<clientCertificateMappingAuthentication enabled="false" />
|
||||
<digestAuthentication enabled="false" />
|
||||
<iisClientCertificateMappingAuthentication enabled="false">
|
||||
</iisClientCertificateMappingAuthentication>
|
||||
<windowsAuthentication enabled="false">
|
||||
<providers>
|
||||
<add value="Negotiate" />
|
||||
<add value="NTLM" />
|
||||
</providers>
|
||||
</windowsAuthentication>
|
||||
</authentication>
|
||||
<authorization>
|
||||
<add accessType="Allow" users="*" />
|
||||
</authorization>
|
||||
<ipSecurity allowUnlisted="true" />
|
||||
<isapiCgiRestriction notListedIsapisAllowed="true" notListedCgisAllowed="true">
|
||||
<add path="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" />
|
||||
<add path="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" />
|
||||
<add path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" />
|
||||
<add path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" />
|
||||
</isapiCgiRestriction>
|
||||
<requestFiltering>
|
||||
<fileExtensions allowUnlisted="true" applyToWebDAV="true">
|
||||
<add fileExtension=".asa" allowed="false" />
|
||||
<add fileExtension=".asax" allowed="false" />
|
||||
<add fileExtension=".ascx" allowed="false" />
|
||||
<add fileExtension=".master" allowed="false" />
|
||||
<add fileExtension=".skin" allowed="false" />
|
||||
<add fileExtension=".browser" allowed="false" />
|
||||
<add fileExtension=".sitemap" allowed="false" />
|
||||
<add fileExtension=".config" allowed="false" />
|
||||
<add fileExtension=".cs" allowed="false" />
|
||||
<add fileExtension=".csproj" allowed="false" />
|
||||
<add fileExtension=".vb" allowed="false" />
|
||||
<add fileExtension=".vbproj" allowed="false" />
|
||||
<add fileExtension=".webinfo" allowed="false" />
|
||||
<add fileExtension=".licx" allowed="false" />
|
||||
<add fileExtension=".resx" allowed="false" />
|
||||
<add fileExtension=".resources" allowed="false" />
|
||||
<add fileExtension=".mdb" allowed="false" />
|
||||
<add fileExtension=".vjsproj" allowed="false" />
|
||||
<add fileExtension=".java" allowed="false" />
|
||||
<add fileExtension=".jsl" allowed="false" />
|
||||
<add fileExtension=".ldb" allowed="false" />
|
||||
<add fileExtension=".dsdgm" allowed="false" />
|
||||
<add fileExtension=".ssdgm" allowed="false" />
|
||||
<add fileExtension=".lsad" allowed="false" />
|
||||
<add fileExtension=".ssmap" allowed="false" />
|
||||
<add fileExtension=".cd" allowed="false" />
|
||||
<add fileExtension=".dsprototype" allowed="false" />
|
||||
<add fileExtension=".lsaprototype" allowed="false" />
|
||||
<add fileExtension=".sdm" allowed="false" />
|
||||
<add fileExtension=".sdmDocument" allowed="false" />
|
||||
<add fileExtension=".mdf" allowed="false" />
|
||||
<add fileExtension=".ldf" allowed="false" />
|
||||
<add fileExtension=".ad" allowed="false" />
|
||||
<add fileExtension=".dd" allowed="false" />
|
||||
<add fileExtension=".ldd" allowed="false" />
|
||||
<add fileExtension=".sd" allowed="false" />
|
||||
<add fileExtension=".adprototype" allowed="false" />
|
||||
<add fileExtension=".lddprototype" allowed="false" />
|
||||
<add fileExtension=".exclude" allowed="false" />
|
||||
<add fileExtension=".refresh" allowed="false" />
|
||||
<add fileExtension=".compiled" allowed="false" />
|
||||
<add fileExtension=".msgx" allowed="false" />
|
||||
<add fileExtension=".vsdisco" allowed="false" />
|
||||
<add fileExtension=".rules" allowed="false" />
|
||||
</fileExtensions>
|
||||
<verbs allowUnlisted="true" applyToWebDAV="true" />
|
||||
<hiddenSegments applyToWebDAV="true">
|
||||
<add segment="web.config" />
|
||||
<add segment="bin" />
|
||||
<add segment="App_code" />
|
||||
<add segment="App_GlobalResources" />
|
||||
<add segment="App_LocalResources" />
|
||||
<add segment="App_WebReferences" />
|
||||
<add segment="App_Data" />
|
||||
<add segment="App_Browsers" />
|
||||
</hiddenSegments>
|
||||
</requestFiltering>
|
||||
</security>
|
||||
<serverSideInclude ssiExecDisable="false" />
|
||||
<staticContent lockAttributes="isDocFooterFileName">
|
||||
<mimeMap fileExtension=".323" mimeType="text/h323" />
|
||||
<mimeMap fileExtension=".3g2" mimeType="video/3gpp2" />
|
||||
<mimeMap fileExtension=".3gp2" mimeType="video/3gpp2" />
|
||||
<mimeMap fileExtension=".3gp" mimeType="video/3gpp" />
|
||||
<mimeMap fileExtension=".3gpp" mimeType="video/3gpp" />
|
||||
<mimeMap fileExtension=".aac" mimeType="audio/aac" />
|
||||
<mimeMap fileExtension=".aaf" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".aca" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".accdb" mimeType="application/msaccess" />
|
||||
<mimeMap fileExtension=".accde" mimeType="application/msaccess" />
|
||||
<mimeMap fileExtension=".accdt" mimeType="application/msaccess" />
|
||||
<mimeMap fileExtension=".acx" mimeType="application/internet-property-stream" />
|
||||
<mimeMap fileExtension=".adt" mimeType="audio/vnd.dlna.adts" />
|
||||
<mimeMap fileExtension=".adts" mimeType="audio/vnd.dlna.adts" />
|
||||
<mimeMap fileExtension=".afm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ai" mimeType="application/postscript" />
|
||||
<mimeMap fileExtension=".aif" mimeType="audio/x-aiff" />
|
||||
<mimeMap fileExtension=".aifc" mimeType="audio/aiff" />
|
||||
<mimeMap fileExtension=".aiff" mimeType="audio/aiff" />
|
||||
<mimeMap fileExtension=".appcache" mimeType="text/cache-manifest" />
|
||||
<mimeMap fileExtension=".application" mimeType="application/x-ms-application" />
|
||||
<mimeMap fileExtension=".art" mimeType="image/x-jg" />
|
||||
<mimeMap fileExtension=".asd" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".asf" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".asi" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".asm" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".asr" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".asx" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".atom" mimeType="application/atom+xml" />
|
||||
<mimeMap fileExtension=".au" mimeType="audio/basic" />
|
||||
<mimeMap fileExtension=".avi" mimeType="video/avi" />
|
||||
<mimeMap fileExtension=".axs" mimeType="application/olescript" />
|
||||
<mimeMap fileExtension=".bas" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".bcpio" mimeType="application/x-bcpio" />
|
||||
<mimeMap fileExtension=".bin" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".bmp" mimeType="image/bmp" />
|
||||
<mimeMap fileExtension=".c" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".cab" mimeType="application/vnd.ms-cab-compressed" />
|
||||
<mimeMap fileExtension=".calx" mimeType="application/vnd.ms-office.calx" />
|
||||
<mimeMap fileExtension=".cat" mimeType="application/vnd.ms-pki.seccat" />
|
||||
<mimeMap fileExtension=".cdf" mimeType="application/x-cdf" />
|
||||
<mimeMap fileExtension=".chm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".class" mimeType="application/x-java-applet" />
|
||||
<mimeMap fileExtension=".clp" mimeType="application/x-msclip" />
|
||||
<mimeMap fileExtension=".cmx" mimeType="image/x-cmx" />
|
||||
<mimeMap fileExtension=".cnf" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".cod" mimeType="image/cis-cod" />
|
||||
<mimeMap fileExtension=".cpio" mimeType="application/x-cpio" />
|
||||
<mimeMap fileExtension=".cpp" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".crd" mimeType="application/x-mscardfile" />
|
||||
<mimeMap fileExtension=".crl" mimeType="application/pkix-crl" />
|
||||
<mimeMap fileExtension=".crt" mimeType="application/x-x509-ca-cert" />
|
||||
<mimeMap fileExtension=".csh" mimeType="application/x-csh" />
|
||||
<mimeMap fileExtension=".css" mimeType="text/css" />
|
||||
<mimeMap fileExtension=".csv" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".cur" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".dcr" mimeType="application/x-director" />
|
||||
<mimeMap fileExtension=".deploy" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".der" mimeType="application/x-x509-ca-cert" />
|
||||
<mimeMap fileExtension=".dib" mimeType="image/bmp" />
|
||||
<mimeMap fileExtension=".dir" mimeType="application/x-director" />
|
||||
<mimeMap fileExtension=".disco" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".dll" mimeType="application/x-msdownload" />
|
||||
<mimeMap fileExtension=".dll.config" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".dlm" mimeType="text/dlm" />
|
||||
<mimeMap fileExtension=".doc" mimeType="application/msword" />
|
||||
<mimeMap fileExtension=".docm" mimeType="application/vnd.ms-word.document.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".docx" mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
|
||||
<mimeMap fileExtension=".dot" mimeType="application/msword" />
|
||||
<mimeMap fileExtension=".dotm" mimeType="application/vnd.ms-word.template.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".dotx" mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.template" />
|
||||
<mimeMap fileExtension=".dsp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".dtd" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".dvi" mimeType="application/x-dvi" />
|
||||
<mimeMap fileExtension=".dvr-ms" mimeType="video/x-ms-dvr" />
|
||||
<mimeMap fileExtension=".dwf" mimeType="drawing/x-dwf" />
|
||||
<mimeMap fileExtension=".dwp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".dxr" mimeType="application/x-director" />
|
||||
<mimeMap fileExtension=".eml" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".emz" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
|
||||
<mimeMap fileExtension=".eps" mimeType="application/postscript" />
|
||||
<mimeMap fileExtension=".esd" mimeType="application/vnd.ms-cab-compressed" />
|
||||
<mimeMap fileExtension=".etx" mimeType="text/x-setext" />
|
||||
<mimeMap fileExtension=".evy" mimeType="application/envoy" />
|
||||
<mimeMap fileExtension=".exe" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".exe.config" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".fdf" mimeType="application/vnd.fdf" />
|
||||
<mimeMap fileExtension=".fif" mimeType="application/fractals" />
|
||||
<mimeMap fileExtension=".fla" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".flr" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".flv" mimeType="video/x-flv" />
|
||||
<mimeMap fileExtension=".gif" mimeType="image/gif" />
|
||||
<mimeMap fileExtension=".glb" mimeType="model/gltf-binary" />
|
||||
<mimeMap fileExtension=".gtar" mimeType="application/x-gtar" />
|
||||
<mimeMap fileExtension=".gz" mimeType="application/x-gzip" />
|
||||
<mimeMap fileExtension=".h" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".hdf" mimeType="application/x-hdf" />
|
||||
<mimeMap fileExtension=".hdml" mimeType="text/x-hdml" />
|
||||
<mimeMap fileExtension=".hhc" mimeType="application/x-oleobject" />
|
||||
<mimeMap fileExtension=".hhk" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".hhp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".hlp" mimeType="application/winhlp" />
|
||||
<mimeMap fileExtension=".hqx" mimeType="application/mac-binhex40" />
|
||||
<mimeMap fileExtension=".hta" mimeType="application/hta" />
|
||||
<mimeMap fileExtension=".htc" mimeType="text/x-component" />
|
||||
<mimeMap fileExtension=".htm" mimeType="text/html" />
|
||||
<mimeMap fileExtension=".html" mimeType="text/html" />
|
||||
<mimeMap fileExtension=".htt" mimeType="text/webviewhtml" />
|
||||
<mimeMap fileExtension=".hxt" mimeType="text/html" />
|
||||
<mimeMap fileExtension=".ico" mimeType="image/x-icon" />
|
||||
<mimeMap fileExtension=".ics" mimeType="text/calendar" />
|
||||
<mimeMap fileExtension=".ief" mimeType="image/ief" />
|
||||
<mimeMap fileExtension=".iii" mimeType="application/x-iphone" />
|
||||
<mimeMap fileExtension=".inf" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ins" mimeType="application/x-internet-signup" />
|
||||
<mimeMap fileExtension=".isp" mimeType="application/x-internet-signup" />
|
||||
<mimeMap fileExtension=".IVF" mimeType="video/x-ivf" />
|
||||
<mimeMap fileExtension=".jar" mimeType="application/java-archive" />
|
||||
<mimeMap fileExtension=".java" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".jck" mimeType="application/liquidmotion" />
|
||||
<mimeMap fileExtension=".jcz" mimeType="application/liquidmotion" />
|
||||
<mimeMap fileExtension=".jfif" mimeType="image/pjpeg" />
|
||||
<mimeMap fileExtension=".jpb" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".jpe" mimeType="image/jpeg" />
|
||||
<mimeMap fileExtension=".jpeg" mimeType="image/jpeg" />
|
||||
<mimeMap fileExtension=".jpg" mimeType="image/jpeg" />
|
||||
<mimeMap fileExtension=".js" mimeType="application/javascript" />
|
||||
<mimeMap fileExtension=".json" mimeType="application/json" />
|
||||
<mimeMap fileExtension=".jsonld" mimeType="application/ld+json" />
|
||||
<mimeMap fileExtension=".jsx" mimeType="text/jscript" />
|
||||
<mimeMap fileExtension=".latex" mimeType="application/x-latex" />
|
||||
<mimeMap fileExtension=".less" mimeType="text/css" />
|
||||
<mimeMap fileExtension=".lit" mimeType="application/x-ms-reader" />
|
||||
<mimeMap fileExtension=".lpk" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".lsf" mimeType="video/x-la-asf" />
|
||||
<mimeMap fileExtension=".lsx" mimeType="video/x-la-asf" />
|
||||
<mimeMap fileExtension=".lzh" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".m13" mimeType="application/x-msmediaview" />
|
||||
<mimeMap fileExtension=".m14" mimeType="application/x-msmediaview" />
|
||||
<mimeMap fileExtension=".m1v" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".m2ts" mimeType="video/vnd.dlna.mpeg-tts" />
|
||||
<mimeMap fileExtension=".m3u" mimeType="audio/x-mpegurl" />
|
||||
<mimeMap fileExtension=".m4a" mimeType="audio/mp4" />
|
||||
<mimeMap fileExtension=".m4v" mimeType="video/mp4" />
|
||||
<mimeMap fileExtension=".man" mimeType="application/x-troff-man" />
|
||||
<mimeMap fileExtension=".manifest" mimeType="application/x-ms-manifest" />
|
||||
<mimeMap fileExtension=".map" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".mdb" mimeType="application/x-msaccess" />
|
||||
<mimeMap fileExtension=".mdp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".me" mimeType="application/x-troff-me" />
|
||||
<mimeMap fileExtension=".mht" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".mhtml" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".mid" mimeType="audio/mid" />
|
||||
<mimeMap fileExtension=".midi" mimeType="audio/mid" />
|
||||
<mimeMap fileExtension=".mix" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".mmf" mimeType="application/x-smaf" />
|
||||
<mimeMap fileExtension=".mno" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".mny" mimeType="application/x-msmoney" />
|
||||
<mimeMap fileExtension=".mov" mimeType="video/quicktime" />
|
||||
<mimeMap fileExtension=".movie" mimeType="video/x-sgi-movie" />
|
||||
<mimeMap fileExtension=".mp2" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />
|
||||
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
|
||||
<mimeMap fileExtension=".mp4v" mimeType="video/mp4" />
|
||||
<mimeMap fileExtension=".mpa" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpe" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpeg" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpg" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".mpp" mimeType="application/vnd.ms-project" />
|
||||
<mimeMap fileExtension=".mpv2" mimeType="video/mpeg" />
|
||||
<mimeMap fileExtension=".ms" mimeType="application/x-troff-ms" />
|
||||
<mimeMap fileExtension=".msi" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".mso" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".mvb" mimeType="application/x-msmediaview" />
|
||||
<mimeMap fileExtension=".mvc" mimeType="application/x-miva-compiled" />
|
||||
<mimeMap fileExtension=".nc" mimeType="application/x-netcdf" />
|
||||
<mimeMap fileExtension=".nsc" mimeType="video/x-ms-asf" />
|
||||
<mimeMap fileExtension=".nws" mimeType="message/rfc822" />
|
||||
<mimeMap fileExtension=".ocx" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".oda" mimeType="application/oda" />
|
||||
<mimeMap fileExtension=".odc" mimeType="text/x-ms-odc" />
|
||||
<mimeMap fileExtension=".ods" mimeType="application/oleobject" />
|
||||
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
|
||||
<mimeMap fileExtension=".ogg" mimeType="video/ogg" />
|
||||
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
|
||||
<mimeMap fileExtension=".one" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onea" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onetoc" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onetoc2" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onetmp" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".onepkg" mimeType="application/onenote" />
|
||||
<mimeMap fileExtension=".osdx" mimeType="application/opensearchdescription+xml" />
|
||||
<mimeMap fileExtension=".otf" mimeType="font/otf" />
|
||||
<mimeMap fileExtension=".p10" mimeType="application/pkcs10" />
|
||||
<mimeMap fileExtension=".p12" mimeType="application/x-pkcs12" />
|
||||
<mimeMap fileExtension=".p7b" mimeType="application/x-pkcs7-certificates" />
|
||||
<mimeMap fileExtension=".p7c" mimeType="application/pkcs7-mime" />
|
||||
<mimeMap fileExtension=".p7m" mimeType="application/pkcs7-mime" />
|
||||
<mimeMap fileExtension=".p7r" mimeType="application/x-pkcs7-certreqresp" />
|
||||
<mimeMap fileExtension=".p7s" mimeType="application/pkcs7-signature" />
|
||||
<mimeMap fileExtension=".pbm" mimeType="image/x-portable-bitmap" />
|
||||
<mimeMap fileExtension=".pcx" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pcz" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pdf" mimeType="application/pdf" />
|
||||
<mimeMap fileExtension=".pfb" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pfm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pfx" mimeType="application/x-pkcs12" />
|
||||
<mimeMap fileExtension=".pgm" mimeType="image/x-portable-graymap" />
|
||||
<mimeMap fileExtension=".pko" mimeType="application/vnd.ms-pki.pko" />
|
||||
<mimeMap fileExtension=".pma" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pmc" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pml" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pmr" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".pmw" mimeType="application/x-perfmon" />
|
||||
<mimeMap fileExtension=".png" mimeType="image/png" />
|
||||
<mimeMap fileExtension=".pnm" mimeType="image/x-portable-anymap" />
|
||||
<mimeMap fileExtension=".pnz" mimeType="image/png" />
|
||||
<mimeMap fileExtension=".pot" mimeType="application/vnd.ms-powerpoint" />
|
||||
<mimeMap fileExtension=".potm" mimeType="application/vnd.ms-powerpoint.template.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".potx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.template" />
|
||||
<mimeMap fileExtension=".ppam" mimeType="application/vnd.ms-powerpoint.addin.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".ppm" mimeType="image/x-portable-pixmap" />
|
||||
<mimeMap fileExtension=".pps" mimeType="application/vnd.ms-powerpoint" />
|
||||
<mimeMap fileExtension=".ppsm" mimeType="application/vnd.ms-powerpoint.slideshow.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".ppsx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.slideshow" />
|
||||
<mimeMap fileExtension=".ppt" mimeType="application/vnd.ms-powerpoint" />
|
||||
<mimeMap fileExtension=".pptm" mimeType="application/vnd.ms-powerpoint.presentation.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".pptx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" />
|
||||
<mimeMap fileExtension=".prf" mimeType="application/pics-rules" />
|
||||
<mimeMap fileExtension=".prm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".prx" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ps" mimeType="application/postscript" />
|
||||
<mimeMap fileExtension=".psd" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".psm" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".psp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pub" mimeType="application/x-mspublisher" />
|
||||
<mimeMap fileExtension=".qt" mimeType="video/quicktime" />
|
||||
<mimeMap fileExtension=".qtl" mimeType="application/x-quicktimeplayer" />
|
||||
<mimeMap fileExtension=".qxd" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ra" mimeType="audio/x-pn-realaudio" />
|
||||
<mimeMap fileExtension=".ram" mimeType="audio/x-pn-realaudio" />
|
||||
<mimeMap fileExtension=".rar" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".ras" mimeType="image/x-cmu-raster" />
|
||||
<mimeMap fileExtension=".rf" mimeType="image/vnd.rn-realflash" />
|
||||
<mimeMap fileExtension=".rgb" mimeType="image/x-rgb" />
|
||||
<mimeMap fileExtension=".rm" mimeType="application/vnd.rn-realmedia" />
|
||||
<mimeMap fileExtension=".rmi" mimeType="audio/mid" />
|
||||
<mimeMap fileExtension=".roff" mimeType="application/x-troff" />
|
||||
<mimeMap fileExtension=".rpm" mimeType="audio/x-pn-realaudio-plugin" />
|
||||
<mimeMap fileExtension=".rtf" mimeType="application/rtf" />
|
||||
<mimeMap fileExtension=".rtx" mimeType="text/richtext" />
|
||||
<mimeMap fileExtension=".scd" mimeType="application/x-msschedule" />
|
||||
<mimeMap fileExtension=".sct" mimeType="text/scriptlet" />
|
||||
<mimeMap fileExtension=".sea" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".setpay" mimeType="application/set-payment-initiation" />
|
||||
<mimeMap fileExtension=".setreg" mimeType="application/set-registration-initiation" />
|
||||
<mimeMap fileExtension=".sgml" mimeType="text/sgml" />
|
||||
<mimeMap fileExtension=".sh" mimeType="application/x-sh" />
|
||||
<mimeMap fileExtension=".shar" mimeType="application/x-shar" />
|
||||
<mimeMap fileExtension=".sit" mimeType="application/x-stuffit" />
|
||||
<mimeMap fileExtension=".sldm" mimeType="application/vnd.ms-powerpoint.slide.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".sldx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.slide" />
|
||||
<mimeMap fileExtension=".smd" mimeType="audio/x-smd" />
|
||||
<mimeMap fileExtension=".smi" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".smx" mimeType="audio/x-smd" />
|
||||
<mimeMap fileExtension=".smz" mimeType="audio/x-smd" />
|
||||
<mimeMap fileExtension=".snd" mimeType="audio/basic" />
|
||||
<mimeMap fileExtension=".snp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".spc" mimeType="application/x-pkcs7-certificates" />
|
||||
<mimeMap fileExtension=".spl" mimeType="application/futuresplash" />
|
||||
<mimeMap fileExtension=".spx" mimeType="audio/ogg" />
|
||||
<mimeMap fileExtension=".src" mimeType="application/x-wais-source" />
|
||||
<mimeMap fileExtension=".ssm" mimeType="application/streamingmedia" />
|
||||
<mimeMap fileExtension=".sst" mimeType="application/vnd.ms-pki.certstore" />
|
||||
<mimeMap fileExtension=".stl" mimeType="application/vnd.ms-pki.stl" />
|
||||
<mimeMap fileExtension=".sv4cpio" mimeType="application/x-sv4cpio" />
|
||||
<mimeMap fileExtension=".sv4crc" mimeType="application/x-sv4crc" />
|
||||
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
|
||||
<mimeMap fileExtension=".svgz" mimeType="image/svg+xml" />
|
||||
<mimeMap fileExtension=".swf" mimeType="application/x-shockwave-flash" />
|
||||
<mimeMap fileExtension=".t" mimeType="application/x-troff" />
|
||||
<mimeMap fileExtension=".tar" mimeType="application/x-tar" />
|
||||
<mimeMap fileExtension=".tcl" mimeType="application/x-tcl" />
|
||||
<mimeMap fileExtension=".tex" mimeType="application/x-tex" />
|
||||
<mimeMap fileExtension=".texi" mimeType="application/x-texinfo" />
|
||||
<mimeMap fileExtension=".texinfo" mimeType="application/x-texinfo" />
|
||||
<mimeMap fileExtension=".tgz" mimeType="application/x-compressed" />
|
||||
<mimeMap fileExtension=".thmx" mimeType="application/vnd.ms-officetheme" />
|
||||
<mimeMap fileExtension=".thn" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".tif" mimeType="image/tiff" />
|
||||
<mimeMap fileExtension=".tiff" mimeType="image/tiff" />
|
||||
<mimeMap fileExtension=".toc" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".tr" mimeType="application/x-troff" />
|
||||
<mimeMap fileExtension=".trm" mimeType="application/x-msterminal" />
|
||||
<mimeMap fileExtension=".ts" mimeType="video/vnd.dlna.mpeg-tts" />
|
||||
<mimeMap fileExtension=".tsv" mimeType="text/tab-separated-values" />
|
||||
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".tts" mimeType="video/vnd.dlna.mpeg-tts" />
|
||||
<mimeMap fileExtension=".txt" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".u32" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".uls" mimeType="text/iuls" />
|
||||
<mimeMap fileExtension=".ustar" mimeType="application/x-ustar" />
|
||||
<mimeMap fileExtension=".vbs" mimeType="text/vbscript" />
|
||||
<mimeMap fileExtension=".vcf" mimeType="text/x-vcard" />
|
||||
<mimeMap fileExtension=".vcs" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".vdx" mimeType="application/vnd.ms-visio.viewer" />
|
||||
<mimeMap fileExtension=".vml" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".vsd" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vss" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vst" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vsto" mimeType="application/x-ms-vsto" />
|
||||
<mimeMap fileExtension=".vsw" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vsx" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".vtx" mimeType="application/vnd.visio" />
|
||||
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
|
||||
<mimeMap fileExtension=".wav" mimeType="audio/wav" />
|
||||
<mimeMap fileExtension=".wax" mimeType="audio/x-ms-wax" />
|
||||
<mimeMap fileExtension=".wbmp" mimeType="image/vnd.wap.wbmp" />
|
||||
<mimeMap fileExtension=".wcm" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".wdb" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".webm" mimeType="video/webm" />
|
||||
<mimeMap fileExtension=".wks" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".wm" mimeType="video/x-ms-wm" />
|
||||
<mimeMap fileExtension=".wma" mimeType="audio/x-ms-wma" />
|
||||
<mimeMap fileExtension=".wmd" mimeType="application/x-ms-wmd" />
|
||||
<mimeMap fileExtension=".wmf" mimeType="application/x-msmetafile" />
|
||||
<mimeMap fileExtension=".wml" mimeType="text/vnd.wap.wml" />
|
||||
<mimeMap fileExtension=".wmlc" mimeType="application/vnd.wap.wmlc" />
|
||||
<mimeMap fileExtension=".wmls" mimeType="text/vnd.wap.wmlscript" />
|
||||
<mimeMap fileExtension=".wmlsc" mimeType="application/vnd.wap.wmlscriptc" />
|
||||
<mimeMap fileExtension=".wmp" mimeType="video/x-ms-wmp" />
|
||||
<mimeMap fileExtension=".wmv" mimeType="video/x-ms-wmv" />
|
||||
<mimeMap fileExtension=".wmx" mimeType="video/x-ms-wmx" />
|
||||
<mimeMap fileExtension=".wmz" mimeType="application/x-ms-wmz" />
|
||||
<mimeMap fileExtension=".woff" mimeType="font/x-woff" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
|
||||
<mimeMap fileExtension=".wps" mimeType="application/vnd.ms-works" />
|
||||
<mimeMap fileExtension=".wri" mimeType="application/x-mswrite" />
|
||||
<mimeMap fileExtension=".wrl" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".wrz" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".wsdl" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".wtv" mimeType="video/x-ms-wtv" />
|
||||
<mimeMap fileExtension=".wvx" mimeType="video/x-ms-wvx" />
|
||||
<mimeMap fileExtension=".x" mimeType="application/directx" />
|
||||
<mimeMap fileExtension=".xaf" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".xaml" mimeType="application/xaml+xml" />
|
||||
<mimeMap fileExtension=".xap" mimeType="application/x-silverlight-app" />
|
||||
<mimeMap fileExtension=".xbap" mimeType="application/x-ms-xbap" />
|
||||
<mimeMap fileExtension=".xbm" mimeType="image/x-xbitmap" />
|
||||
<mimeMap fileExtension=".xdr" mimeType="text/plain" />
|
||||
<mimeMap fileExtension=".xht" mimeType="application/xhtml+xml" />
|
||||
<mimeMap fileExtension=".xhtml" mimeType="application/xhtml+xml" />
|
||||
<mimeMap fileExtension=".xla" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xlam" mimeType="application/vnd.ms-excel.addin.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xlc" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xlm" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xls" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xlsb" mimeType="application/vnd.ms-excel.sheet.binary.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xlsm" mimeType="application/vnd.ms-excel.sheet.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xlsx" mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
|
||||
<mimeMap fileExtension=".xlt" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xltm" mimeType="application/vnd.ms-excel.template.macroEnabled.12" />
|
||||
<mimeMap fileExtension=".xltx" mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.template" />
|
||||
<mimeMap fileExtension=".xlw" mimeType="application/vnd.ms-excel" />
|
||||
<mimeMap fileExtension=".xml" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xof" mimeType="x-world/x-vrml" />
|
||||
<mimeMap fileExtension=".xpm" mimeType="image/x-xpixmap" />
|
||||
<mimeMap fileExtension=".xps" mimeType="application/vnd.ms-xpsdocument" />
|
||||
<mimeMap fileExtension=".xsd" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xsf" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xsl" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xslt" mimeType="text/xml" />
|
||||
<mimeMap fileExtension=".xsn" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".xtp" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".xwd" mimeType="image/x-xwindowdump" />
|
||||
<mimeMap fileExtension=".z" mimeType="application/x-compress" />
|
||||
<mimeMap fileExtension=".zip" mimeType="application/x-zip-compressed" />
|
||||
</staticContent>
|
||||
<tracing>
|
||||
<traceFailedRequests>
|
||||
<add path="*">
|
||||
<traceAreas>
|
||||
<add provider="ASP" verbosity="Verbose" />
|
||||
<add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
|
||||
<add provider="ISAPI Extension" verbosity="Verbose" />
|
||||
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,Rewrite,WebSocket" verbosity="Verbose" />
|
||||
</traceAreas>
|
||||
<failureDefinitions statusCodes="200-999" />
|
||||
</add>
|
||||
</traceFailedRequests>
|
||||
<traceProviderDefinitions>
|
||||
<add name="WWW Server" guid="{3a2a4e84-4c21-4981-ae10-3fda0d9b0f83}">
|
||||
<areas>
|
||||
<clear />
|
||||
<add name="Authentication" value="2" />
|
||||
<add name="Security" value="4" />
|
||||
<add name="Filter" value="8" />
|
||||
<add name="StaticFile" value="16" />
|
||||
<add name="CGI" value="32" />
|
||||
<add name="Compression" value="64" />
|
||||
<add name="Cache" value="128" />
|
||||
<add name="RequestNotifications" value="256" />
|
||||
<add name="Module" value="512" />
|
||||
<add name="Rewrite" value="1024" />
|
||||
<add name="FastCGI" value="4096" />
|
||||
<add name="WebSocket" value="16384" />
|
||||
</areas>
|
||||
</add>
|
||||
<add name="ASP" guid="{06b94d9a-b15e-456e-a4ef-37c984a2cb4b}">
|
||||
<areas>
|
||||
<clear />
|
||||
</areas>
|
||||
</add>
|
||||
<add name="ISAPI Extension" guid="{a1c2040e-8840-4c31-ba11-9871031a19ea}">
|
||||
<areas>
|
||||
<clear />
|
||||
</areas>
|
||||
</add>
|
||||
<add name="ASPNET" guid="{AFF081FE-0247-4275-9C4E-021F3DC1DA35}">
|
||||
<areas>
|
||||
<add name="Infrastructure" value="1" />
|
||||
<add name="Module" value="2" />
|
||||
<add name="Page" value="4" />
|
||||
<add name="AppServices" value="8" />
|
||||
</areas>
|
||||
</add>
|
||||
</traceProviderDefinitions>
|
||||
</tracing>
|
||||
<urlCompression />
|
||||
<validation />
|
||||
<webdav>
|
||||
<globalSettings>
|
||||
<propertyStores>
|
||||
<add name="webdav_simple_prop" image="%IIS_BIN%\webdav_simple_prop.dll" image32="%IIS_BIN%\webdav_simple_prop.dll" />
|
||||
</propertyStores>
|
||||
<lockStores>
|
||||
<add name="webdav_simple_lock" image="%IIS_BIN%\webdav_simple_lock.dll" image32="%IIS_BIN%\webdav_simple_lock.dll" />
|
||||
</lockStores>
|
||||
</globalSettings>
|
||||
<authoring>
|
||||
<locks enabled="true" lockStore="webdav_simple_lock" />
|
||||
</authoring>
|
||||
<authoringRules />
|
||||
</webdav>
|
||||
<webSocket />
|
||||
<applicationInitialization />
|
||||
</system.webServer>
|
||||
<location path="" overrideMode="Allow">
|
||||
<system.webServer>
|
||||
<modules>
|
||||
<add name="IsapiFilterModule" lockItem="true" />
|
||||
<add name="BasicAuthenticationModule" lockItem="true" />
|
||||
<add name="IsapiModule" lockItem="true" />
|
||||
<add name="HttpLoggingModule" lockItem="true" />
|
||||
<add name="DynamicCompressionModule" lockItem="true" />
|
||||
<add name="StaticCompressionModule" lockItem="true" />
|
||||
<add name="DefaultDocumentModule" lockItem="true" />
|
||||
<add name="DirectoryListingModule" lockItem="true" />
|
||||
<add name="ProtocolSupportModule" lockItem="true" />
|
||||
<add name="HttpRedirectionModule" lockItem="true" />
|
||||
<add name="ServerSideIncludeModule" lockItem="true" />
|
||||
<add name="StaticFileModule" lockItem="true" />
|
||||
<add name="AnonymousAuthenticationModule" lockItem="true" />
|
||||
<add name="CertificateMappingAuthenticationModule" lockItem="true" />
|
||||
<add name="UrlAuthorizationModule" lockItem="true" />
|
||||
<add name="WindowsAuthenticationModule" lockItem="true" />
|
||||
<add name="IISCertificateMappingAuthenticationModule" lockItem="true" />
|
||||
<add name="WebMatrixSupportModule" lockItem="true" />
|
||||
<add name="IpRestrictionModule" lockItem="true" />
|
||||
<add name="DynamicIpRestrictionModule" lockItem="true" />
|
||||
<add name="RequestFilteringModule" lockItem="true" />
|
||||
<add name="CustomLoggingModule" lockItem="true" />
|
||||
<add name="CustomErrorModule" lockItem="true" />
|
||||
<add name="FailedRequestsTracingModule" lockItem="true" />
|
||||
<add name="CgiModule" lockItem="true" />
|
||||
<add name="FastCgiModule" lockItem="true" />
|
||||
<!-- <add name="WebDAVModule" /> -->
|
||||
<add name="RewriteModule" />
|
||||
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" preCondition="managedHandler" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="managedHandler" />
|
||||
<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" preCondition="managedHandler" />
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="managedHandler" />
|
||||
<add name="DefaultAuthentication" type="System.Web.Security.DefaultAuthenticationModule" preCondition="managedHandler" />
|
||||
<add name="RoleManager" type="System.Web.Security.RoleManagerModule" preCondition="managedHandler" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" preCondition="managedHandler" />
|
||||
<add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" preCondition="managedHandler" />
|
||||
<add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule" preCondition="managedHandler" />
|
||||
<add name="Profile" type="System.Web.Profile.ProfileModule" preCondition="managedHandler" />
|
||||
<add name="UrlMappingsModule" type="System.Web.UrlMappingsModule" preCondition="managedHandler" />
|
||||
<add name="ApplicationInitializationModule" lockItem="true" />
|
||||
<add name="WebSocketModule" lockItem="true" />
|
||||
<add name="ServiceModel-4.0" type="System.ServiceModel.Activation.ServiceHttpModule,System.ServiceModel.Activation,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="ConfigurationValidationModule" lockItem="true" />
|
||||
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
</modules>
|
||||
<handlers accessPolicy="Read, Script">
|
||||
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
|
||||
<add name="AXD-ISAPI-4.0_64bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-4.0_64bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-4.0_64bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-4.0_64bit" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-4.0_64bit" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-4.0_64bit" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="svc-ISAPI-4.0_64bit" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="rules-ISAPI-4.0_64bit" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="xoml-ISAPI-4.0_64bit" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="xamlx-ISAPI-4.0_64bit" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="aspq-ISAPI-4.0_64bit" path="*.aspq" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="cshtm-ISAPI-4.0_64bit" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="cshtml-ISAPI-4.0_64bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="vbhtm-ISAPI-4.0_64bit" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="vbhtml-ISAPI-4.0_64bit" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="AXD-ISAPI-4.0_32bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-4.0_32bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-4.0_32bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-4.0_32bit" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-4.0_32bit" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-4.0_32bit" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="svc-ISAPI-4.0_32bit" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="rules-ISAPI-4.0_32bit" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="xoml-ISAPI-4.0_32bit" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="xamlx-ISAPI-4.0_32bit" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="aspq-ISAPI-4.0_32bit" path="*.aspq" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="cshtm-ISAPI-4.0_32bit" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="cshtml-ISAPI-4.0_32bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="vbhtm-ISAPI-4.0_32bit" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="vbhtml-ISAPI-4.0_32bit" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="TraceHandler-Integrated-4.0" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="WebAdminHandler-Integrated-4.0" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="AssemblyResourceLoader-Integrated-4.0" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="PageHandlerFactory-Integrated-4.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="SimpleHandlerFactory-Integrated-4.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="WebServiceHandlerFactory-Integrated-4.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-Integrated-4.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-Integrated-4.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="rules-Integrated-4.0" path="*.rules" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="xoml-Integrated-4.0" path="*.xoml" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="xamlx-Integrated-4.0" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" type="System.Xaml.Hosting.XamlHttpHandlerFactory, System.Xaml.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="aspq-Integrated-4.0" path="*.aspq" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="cshtm-Integrated-4.0" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="cshtml-Integrated-4.0" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="vbhtm-Integrated-4.0" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="vbhtml-Integrated-4.0" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="ScriptHandlerFactoryAppServices-Integrated-4.0" path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="ScriptResourceIntegrated-4.0" path="*ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
<add name="ASPClassic" path="*.asp" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%IIS_BIN%\asp.dll" resourceType="File" />
|
||||
<add name="SecurityCertificate" path="*.cer" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%IIS_BIN%\asp.dll" resourceType="File" />
|
||||
<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
|
||||
<add name="TraceHandler-Integrated" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="WebAdminHandler-Integrated" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="AssemblyResourceLoader-Integrated" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="WebServiceHandlerFactory-Integrated" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Services.Protocols.WebServiceHandlerFactory,System.Web.Services,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-Integrated" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,System.Runtime.Remoting,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-Integrated" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,System.Runtime.Remoting,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" />
|
||||
<add name="AXD-ISAPI-2.0" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-2.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="AXD-ISAPI-2.0-64" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-2.0-64" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-2.0-64" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="WebServiceHandlerFactory-ISAPI-2.0-64" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0-64" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0-64" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="CGI-exe" path="*.exe" verb="*" modules="CgiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
|
||||
<add name="SSINC-stm" path="*.stm" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" />
|
||||
<add name="SSINC-shtm" path="*.shtm" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" />
|
||||
<add name="SSINC-shtml" path="*.shtml" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" />
|
||||
<add name="TRACEVerbHandler" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" />
|
||||
<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" />
|
||||
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
|
||||
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</location>
|
||||
</configuration>
|
BIN
.vs/cuda-samples/v17/.suo
Normal file
BIN
.vs/cuda-samples/v17/.suo
Normal file
Binary file not shown.
BIN
.vs/cuda-samples/v17/Browse.VC.db
Normal file
BIN
.vs/cuda-samples/v17/Browse.VC.db
Normal file
Binary file not shown.
BIN
.vs/slnx.sqlite
Normal file
BIN
.vs/slnx.sqlite
Normal file
Binary file not shown.
117
CHANGELOG.md
Normal file
117
CHANGELOG.md
Normal file
|
@ -0,0 +1,117 @@
|
|||
## Changelog
|
||||
|
||||
### CUDA 11.5
|
||||
* Added `cuDLAHybridMode`. Demonstrate usage of cuDLA in hybrid mode.
|
||||
* Added `cuDLAStandaloneMode`. Demonstrate usage of cuDLA in standalone mode.
|
||||
* Added `cuDLAErrorReporting`. Demonstrate DLA error detection via CUDA.
|
||||
* Added `graphMemoryNodes`. Demonstrates memory allocations and frees within CUDA graphs using Graph APIs and Stream Capture APIs.
|
||||
* Added `graphMemoryFootprint`. Demonstrates how graph memory nodes re-use virtual addresses and physical memory.
|
||||
* All samples from CUDA toolkit are now available on [GitHub](https://github.com/nvidia/cuda-samples).
|
||||
|
||||
### CUDA 11.4 update 1
|
||||
* Added support for VS Code on linux platform.
|
||||
|
||||
### CUDA 11.4
|
||||
* Added `cdpQuadtree`. Demonstrates Quad Trees implementation using CUDA Dynamic Parallelism.
|
||||
* Updated `simpleVulkan`, `simpleVulkanMMAP` and `vulkanImageCUDA`. Demonstrates use of SPIR-V shaders.
|
||||
|
||||
### CUDA 11.3
|
||||
* Added `streamOrderedAllocationIPC`. Demonstrates Inter Process Communication using one process per GPU for computation.
|
||||
* Added `simpleCUBLAS_LU`. Demonstrates batched matrix LU decomposition using cuBLAS API `cublas<t>getrfBatched()`
|
||||
* Updated `simpleVulkan`. Demonstrates use of timeline semaphore.
|
||||
* Updated multiple samples to use pinned memory using `cudaMallocHost()`.
|
||||
|
||||
### CUDA 11.2
|
||||
* Added `streamOrderedAllocation`. Demonstrates stream ordered memory allocation on a GPU using cudaMallocAsync and cudaMemPool family of APIs.
|
||||
* Added `streamOrderedAllocationP2P`. Demonstrates peer-to-peer access of stream ordered memory allocated using cudaMallocAsync and cudaMemPool family of APIs.
|
||||
* Dropped Visual Studio 2015 support from all the windows supported samples.
|
||||
* FreeImage is no longer distributed with the CUDA Samples. On Windows, see the [Dependencies](./README.md#freeimage) section for more details on how to set up FreeImage. On Linux, it is recommended to install FreeImage with your distribution's package manager.
|
||||
* All the samples using CUDA Pipeline & Arrive-wait barriers are been updated to use new `cuda::pipeline` and `cuda::barrier` interfaces.
|
||||
* Updated all the samples to build with parallel build option `--threads` of `nvcc` cuda compiler.
|
||||
* Added `cudaNvSciNvMedia`. Demonstrates CUDA-NvMedia interop via NvSciBuf/NvSciSync APIs.
|
||||
* Added `simpleGL`. Demonstrates interoperability between CUDA and OpenGL.
|
||||
|
||||
### CUDA 11.1
|
||||
* Added `watershedSegmentationNPP`. Demonstrates how to use the NPP watershed segmentation function.
|
||||
* Added `batchedLabelMarkersAndLabelCompressionNPP`. Demonstrates how to use the NPP label markers generation and label compression functions based on a Union Find (UF) algorithm including both single image and batched image versions.
|
||||
* Dropped Visual Studio 2012, 2013 support from all the windows supported samples.
|
||||
* Added kernel performing warp aggregated atomic max in multi buckets using cg::labeled_partition & cg::reduce in `warpAggregatedAtomicsCG`.
|
||||
* Added extended CG shuffle mechanics to `shfl_scan` sample.
|
||||
* Added `cudaOpenMP`. Demonstrates how to use OpenMP API to write an application for multiple GPUs.
|
||||
* Added `simpleZeroCopy`. Demonstrates how to use zero copy, kernels can read and write directly to pinned system memory.
|
||||
|
||||
### CUDA 11.0
|
||||
* Added `dmmaTensorCoreGemm`. Demonstrates double precision GEMM computation using the Double precision Warp Matrix Multiply and Accumulate (WMMA) API introduced with CUDA 11 in Ampere chip family tensor cores.
|
||||
* Added `bf16TensorCoreGemm`. Demonstrates __nv_bfloat16 (e8m7) GEMM computation using the __nv_bfloat16 WMMA API introduced with CUDA 11 in Ampere chip family tensor cores.
|
||||
* Added `tf32TensorCoreGemm`. Demonstrates tf32 (e8m10) GEMM computation using the tf32 WMMA API introduced with CUDA 11 in Ampere chip family tensor cores.
|
||||
* Added `globalToShmemAsyncCopy`. Demonstrates async copy of data from global to shared memory when on compute capability 8.0 or higher. Also demonstrates arrive-wait barrier for synchronization.
|
||||
* Added `simpleAWBarrier`. Demonstrates arrive wait barriers.
|
||||
* Added `simpleAttributes`. Demonstrates the stream attributes that affect L2 locality.
|
||||
* Added warp aggregated atomic multi bucket increments kernel using labeled_partition cooperative groups in `warpAggregatedAtomicsCG` which can be used on compute capability 7.0 and above GPU architectures.
|
||||
* Added `binaryPartitionCG`. Demonstrates binary partition cooperative groups and reduction within the thread block.
|
||||
* Added two new reduction kernels in `reduction` one which demonstrates reduce_add_sync intrinstic supported on compute capability 8.0 and another which uses cooperative_groups::reduce function which does thread_block_tile level reduction introduced from CUDA 11.0.
|
||||
* Added `cudaCompressibleMemory`. Demonstrates compressible memory allocation using cuMemMap API.
|
||||
* Added `simpleVulkanMMAP`. Demonstrates Vulkan CUDA Interop via cuMemMap APIs.
|
||||
* Added `concurrentKernels`. Demonstrates the use of CUDA streams for concurrent execution of several kernels on a GPU.
|
||||
* Dropped Mac OSX support from all samples.
|
||||
|
||||
### CUDA 10.2
|
||||
* Added `simpleD3D11`. Demonstrates CUDA-D3D11 External Resource Interoperability APIs for updating D3D11 buffers from CUDA and synchronization between D3D11 and CUDA with Keyed Mutexes.
|
||||
* Added `simpleDrvRuntime`. Demonstrates CUDA Driver and Runtime APIs working together to load fatbinary of a CUDA kernel.
|
||||
* Added `vectorAddMMAP`. Demonstrates how cuMemMap API allows the user to specify the physical properties of their memory while retaining the contiguous nature of their access.
|
||||
* Added `memMapIPCDrv`. Demonstrates Inter Process Communication using cuMemMap APIs.
|
||||
* Added `cudaNvSci`. Demonstrates CUDA-NvSciBuf/NvSciSync Interop.
|
||||
* Added `jacobiCudaGraphs`. Demonstrates Instantiated CUDA Graph Update with Jacobi Iterative Method using different approaches.
|
||||
* Added `cuSolverSp_LinearSolver`. Demonstrates cuSolverSP's LU, QR and Cholesky factorization.
|
||||
* Added `MersenneTwisterGP11213`. Demonstrates the Mersenne Twister random number generator GP11213 in cuRAND.
|
||||
|
||||
### CUDA 10.1 Update 2
|
||||
* Added `vulkanImageCUDA`. Demonstrates how to perform Vulkan image - CUDA Interop.
|
||||
* Added `nvJPEG_encoder`. Demonstrates encoding of jpeg images using NVJPEG Library.
|
||||
* Added Windows OS support to `nvJPEG` sample.
|
||||
* Added `boxFilterNPP`. Demonstrates how to use NPP FilterBox function to perform a box filter.
|
||||
* Added `cannyEdgeDetectorNPP`. Demonstrates the nppiFilterCannyBorder_8u_C1R Canny Edge Detection image filter function.
|
||||
|
||||
### CUDA 10.1 Update 1
|
||||
* Added `NV12toBGRandResize`. Demonstrates how to convert and resize NV12 frames to BGR planars frames using CUDA in batch.
|
||||
* Added `EGLStream_CUDA_Interop`. Demonstrates data exchange between CUDA and EGL Streams.
|
||||
* Added `cuSolverDn_LinearSolver`. Demonstrates cuSolverDN's LU, QR and Cholesky factorization.
|
||||
* Added support of Visual Studio 2019 to all samples supported on [Windows](./README.md#windows-1).
|
||||
|
||||
### CUDA 10.1
|
||||
* Added `immaTensorCoreGemm`. Demonstrates integer GEMM computation using the Warp Matrix Multiply and Accumulate (WMMA) API for integers employing the Tensor Cores.
|
||||
* Added `simpleIPC`. Demonstrates Inter Process Communication with one process per GPU for computation.
|
||||
* Added `nvJPEG`. Demonstrates single and batched decoding of jpeg images using NVJPEG Library.
|
||||
* Added `bandwidthTest`. It measures the memcopy bandwidth of the GPU and memcpy bandwidth across PCI-e.
|
||||
* Added `reduction`. Demonstrates several important optimization strategies for Data-Parallel Algorithms like reduction.
|
||||
* Update all the samples to support CUDA 10.1.
|
||||
|
||||
|
||||
### CUDA 10.0
|
||||
* Added `simpleCudaGraphs`. Demonstrates CUDA Graphs creation, instantiation and launch using Graphs APIs and Stream Capture APIs.
|
||||
* Added `conjugateGradientCudaGraphs`. Demonstrates conjugate gradient solver on GPU using CUBLAS and CUSPARSE library calls captured and called using CUDA Graph APIs.
|
||||
* Added `simpleVulkan`. Demonstrates Vulkan - CUDA Interop.
|
||||
* Added `simpleD3D12`. Demonstrates DX12 - CUDA Interop.
|
||||
* Added `UnifiedMemoryPerf`. Demonstrates performance comparision of various memory types involved in system.
|
||||
* Added `p2pBandwidthLatencyTest`. Demonstrates Peer-To-Peer (P2P) data transfers between pairs of GPUs and computes latency and bandwidth.
|
||||
* Added `systemWideAtomics`. Demonstrates system wide atomic instructions.
|
||||
* Added `simpleCUBLASXT`. Demonstrates CUBLAS-XT library which performs GEMM operations over multiple GPUs.
|
||||
* Added Windows OS support to `conjugateGradientMultiDeviceCG` sample.
|
||||
* Removed support of Visual Studio 2010 from all samples.
|
||||
|
||||
|
||||
### CUDA 9.2
|
||||
|
||||
This is the first release of CUDA Samples on GitHub:
|
||||
* Added `vectorAdd_nvrtc`. Demonstrates runtime compilation library using NVRTC of a simple vectorAdd kernel.
|
||||
* Added `warpAggregatedAtomicsCG`. Demonstrates warp aggregated atomics using Cooperative Groups.
|
||||
* Added `deviceQuery`. Enumerates the properties of the CUDA devices present in the system.
|
||||
* Added `matrixMul`. Demonstrates a matrix multiplication using shared memory through tiled approach.
|
||||
* Added `matrixMulDrv`. Demonstrates a matrix multiplication using shared memory through tiled approach, uses CUDA Driver API.
|
||||
* Added `cudaTensorCoreGemm`. Demonstrates a GEMM computation using the Warp Matrix Multiply and Accumulate (WMMA) API introduced in CUDA 9, as well as the new Tensor Cores introduced in the Volta chip family.
|
||||
* Added `simpleVoteIntrinsics` which uses *_sync equivalent of the vote intrinsics _any, _all added since CUDA 9.0.
|
||||
* Added `shfl_scan` which uses *_sync equivalent of the shfl intrinsics added since CUDA 9.0.
|
||||
* Added `conjugateGradientMultiBlockCG`. Demonstrates a conjugate gradient solver on GPU using Multi Block Cooperative Groups.
|
||||
* Added `conjugateGradientMultiDeviceCG`. Demonstrates a conjugate gradient solver on multiple GPUs using Multi Device Cooperative Groups, also uses unified memory prefetching and usage hints APIs.
|
||||
* Added `simpleCUBLAS`. Demonstrates how perform GEMM operations using CUBLAS library.
|
||||
* Added `simpleCUFFT`. Demonstrates how perform FFT operations using CUFFT library.
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
Common/data/teapot512.pgm
Normal file
BIN
Common/data/teapot512.pgm
Normal file
Binary file not shown.
BIN
Common/data/teapot_512x512_8u.raw
Normal file
BIN
Common/data/teapot_512x512_8u.raw
Normal file
Binary file not shown.
BIN
Common/data/teapot_512x512_8u_Gray.raw
Normal file
BIN
Common/data/teapot_512x512_8u_Gray.raw
Normal file
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
294
Common/dynlink_d3d10.h
Normal file
294
Common/dynlink_d3d10.h
Normal file
|
@ -0,0 +1,294 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: dynlink_d3d10.h
|
||||
//
|
||||
// Shortcut macros and functions for using DX objects
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef _DYNLINK_D3D10_H_
|
||||
#define _DYNLINK_D3D10_H_
|
||||
|
||||
// Standard Windows includes
|
||||
#include <windows.h>
|
||||
#include <initguid.h>
|
||||
#include <assert.h>
|
||||
#include <wchar.h>
|
||||
#include <mmsystem.h>
|
||||
#include <commctrl.h> // for InitCommonControls()
|
||||
#include <shellapi.h> // for ExtractIcon()
|
||||
#include <new.h> // for placement new
|
||||
#include <shlobj.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// CRT's memory leak detection
|
||||
#if defined(DEBUG) || defined(_DEBUG)
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
// Direct3D9 includes
|
||||
#include <d3d9.h>
|
||||
|
||||
// Direct3D10 includes
|
||||
#include <dxgi.h>
|
||||
#include <d3d10_1.h>
|
||||
#include <d3d10.h>
|
||||
|
||||
// XInput includes
|
||||
#include <xinput.h>
|
||||
|
||||
// strsafe.h deprecates old unsecure string functions. If you
|
||||
// really do not want to it to (not recommended), then uncomment the next line
|
||||
//#define STRSAFE_NO_DEPRECATE
|
||||
|
||||
#ifndef STRSAFE_NO_DEPRECATE
|
||||
#pragma deprecated("strncpy")
|
||||
#pragma deprecated("wcsncpy")
|
||||
#pragma deprecated("_tcsncpy")
|
||||
#pragma deprecated("wcsncat")
|
||||
#pragma deprecated("strncat")
|
||||
#pragma deprecated("_tcsncat")
|
||||
#endif
|
||||
|
||||
#pragma warning( disable : 4996 ) // disable deprecated warning
|
||||
#include <strsafe.h>
|
||||
#pragma warning( default : 4996 )
|
||||
|
||||
#include <DirectXMath.h>
|
||||
|
||||
using namespace DirectX;
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Structs
|
||||
//--------------------------------------------------------------------------------------
|
||||
struct DXUTD3D9DeviceSettings
|
||||
{
|
||||
UINT AdapterOrdinal;
|
||||
D3DDEVTYPE DeviceType;
|
||||
D3DFORMAT AdapterFormat;
|
||||
DWORD BehaviorFlags;
|
||||
D3DPRESENT_PARAMETERS pp;
|
||||
};
|
||||
|
||||
struct DXUTD3D10DeviceSettings
|
||||
{
|
||||
UINT AdapterOrdinal;
|
||||
D3D10_DRIVER_TYPE DriverType;
|
||||
UINT Output;
|
||||
DXGI_SWAP_CHAIN_DESC sd;
|
||||
UINT32 CreateFlags;
|
||||
UINT32 SyncInterval;
|
||||
DWORD PresentFlags;
|
||||
bool AutoCreateDepthStencil; // DXUT will create the a depth stencil resource and view if true
|
||||
DXGI_FORMAT AutoDepthStencilFormat;
|
||||
};
|
||||
|
||||
enum DXUTDeviceVersion { DXUT_D3D9_DEVICE, DXUT_D3D10_DEVICE };
|
||||
struct DXUTDeviceSettings
|
||||
{
|
||||
DXUTDeviceVersion ver;
|
||||
union
|
||||
{
|
||||
DXUTD3D9DeviceSettings d3d9; // only valid if ver == DXUT_D3D9_DEVICE
|
||||
DXUTD3D10DeviceSettings d3d10; // only valid if ver == DXUT_D3D10_DEVICE
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Error codes
|
||||
//--------------------------------------------------------------------------------------
|
||||
#define DXUTERR_NODIRECT3D MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0901)
|
||||
#define DXUTERR_NOCOMPATIBLEDEVICES MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0902)
|
||||
#define DXUTERR_MEDIANOTFOUND MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0903)
|
||||
#define DXUTERR_NONZEROREFCOUNT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0904)
|
||||
#define DXUTERR_CREATINGDEVICE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0905)
|
||||
#define DXUTERR_RESETTINGDEVICE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0906)
|
||||
#define DXUTERR_CREATINGDEVICEOBJECTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0907)
|
||||
#define DXUTERR_RESETTINGDEVICEOBJECTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0908)
|
||||
#define DXUTERR_DEVICEREMOVED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x090A)
|
||||
|
||||
|
||||
typedef HRESULT(WINAPI *LPCREATEDXGIFACTORY)(REFIID, void **);
|
||||
typedef HRESULT(WINAPI *LPD3D10CREATEDEVICE)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT32,
|
||||
ID3D10Device **);
|
||||
typedef HRESULT(WINAPI *LPD3D10CREATEDEVICE1)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT,
|
||||
D3D10_FEATURE_LEVEL1, UINT, ID3D10Device1 **);
|
||||
typedef HRESULT(WINAPI *LPD3D10CREATESTATEBLOCK)(ID3D10Device *pDevice, D3D10_STATE_BLOCK_MASK *pStateBlockMask,
|
||||
ID3D10StateBlock **ppStateBlock);
|
||||
typedef HRESULT(WINAPI *LPD3D10STATEBLOCKMASKUNION)(D3D10_STATE_BLOCK_MASK *pA, D3D10_STATE_BLOCK_MASK *pB,
|
||||
D3D10_STATE_BLOCK_MASK *pResult);
|
||||
typedef HRESULT(WINAPI *LPD3D10STATEBLOCKMASKINTERSECT)(D3D10_STATE_BLOCK_MASK *pA, D3D10_STATE_BLOCK_MASK *pB,
|
||||
D3D10_STATE_BLOCK_MASK *pResult);
|
||||
typedef HRESULT(WINAPI *LPD3D10STATEBLOCKMASKDIFFERENCE)(D3D10_STATE_BLOCK_MASK *pA, D3D10_STATE_BLOCK_MASK *pB,
|
||||
D3D10_STATE_BLOCK_MASK *pResult);
|
||||
typedef HRESULT(WINAPI *LPD3D10STATEBLOCKMASKENABLECAPTURE)(D3D10_STATE_BLOCK_MASK *pMask,
|
||||
D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart,
|
||||
UINT RangeLength);
|
||||
typedef HRESULT(WINAPI *LPD3D10STATEBLOCKMASKDISABLECAPTURE)(D3D10_STATE_BLOCK_MASK *pMask,
|
||||
D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart,
|
||||
UINT RangeLength);
|
||||
typedef HRESULT(WINAPI *LPD3D10STATEBLOCKMASKENABLEALL)(D3D10_STATE_BLOCK_MASK *pMask);
|
||||
typedef HRESULT(WINAPI *LPD3D10STATEBLOCKMASKDISABLEALL)(D3D10_STATE_BLOCK_MASK *pMask);
|
||||
typedef BOOL (WINAPI *LPD3D10STATEBLOCKMASKGETSETTING)(D3D10_STATE_BLOCK_MASK *pMask,
|
||||
D3D10_DEVICE_STATE_TYPES StateType, UINT Entry);
|
||||
|
||||
typedef HRESULT(WINAPI *LPD3D10COMPILEEFFECTFROMMEMORY)(void *pData, SIZE_T DataLength, LPCSTR pSrcFileName,
|
||||
CONST D3D10_SHADER_MACRO *pDefines,
|
||||
ID3D10Include *pInclude, UINT HLSLFlags, UINT FXFlags,
|
||||
ID3D10Blob **ppCompiledEffect, ID3D10Blob **ppErrors);
|
||||
typedef HRESULT(WINAPI *LPD3D10CREATEEFFECTFROMMEMORY)(void *pData, SIZE_T DataLength, UINT FXFlags,
|
||||
ID3D10Device *pDevice,
|
||||
ID3D10EffectPool *pEffectPool,
|
||||
ID3D10Effect **ppEffect);
|
||||
typedef HRESULT(WINAPI *LPD3D10CREATEEFFECTPOOLFROMMEMORY)(void *pData, SIZE_T DataLength, UINT FXFlags,
|
||||
ID3D10Device *pDevice, ID3D10EffectPool **ppEffectPool);
|
||||
|
||||
typedef HRESULT(WINAPI *LPD3D10CREATEDEVICEANDSWAPCHAIN)(IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
UINT SDKVersion,
|
||||
DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D10Device **ppDevice);
|
||||
|
||||
typedef HRESULT(WINAPI *LPD3D10CREATEDEVICEANDSWAPCHAIN1)(IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
D3D10_FEATURE_LEVEL1 HardwareLevel,
|
||||
UINT SDKVersion,
|
||||
DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D10Device1 **ppDevice);
|
||||
|
||||
// Module and function pointers
|
||||
static HMODULE g_hModDXGI = NULL;
|
||||
static HMODULE g_hModD3D10 = NULL;
|
||||
static HMODULE g_hModD3D101 = NULL;
|
||||
static LPCREATEDXGIFACTORY sFnPtr_CreateDXGIFactory = NULL;
|
||||
static LPD3D10CREATESTATEBLOCK sFnPtr_D3D10CreateStateBlock = NULL;
|
||||
static LPD3D10CREATEDEVICE sFnPtr_D3D10CreateDevice = NULL;
|
||||
static LPD3D10CREATEDEVICE1 sFnPtr_D3D10CreateDevice1 = NULL;
|
||||
static LPD3D10STATEBLOCKMASKUNION sFnPtr_D3D10StateBlockMaskUnion = NULL;
|
||||
static LPD3D10STATEBLOCKMASKINTERSECT sFnPtr_D3D10StateBlockMaskIntersect = NULL;
|
||||
static LPD3D10STATEBLOCKMASKDIFFERENCE sFnPtr_D3D10StateBlockMaskDifference = NULL;
|
||||
static LPD3D10STATEBLOCKMASKENABLECAPTURE sFnPtr_D3D10StateBlockMaskEnableCapture = NULL;
|
||||
static LPD3D10STATEBLOCKMASKDISABLECAPTURE sFnPtr_D3D10StateBlockMaskDisableCapture = NULL;
|
||||
static LPD3D10STATEBLOCKMASKENABLEALL sFnPtr_D3D10StateBlockMaskEnableAll = NULL;
|
||||
static LPD3D10STATEBLOCKMASKDISABLEALL sFnPtr_D3D10StateBlockMaskDisableAll = NULL;
|
||||
static LPD3D10STATEBLOCKMASKGETSETTING sFnPtr_D3D10StateBlockMaskGetSetting = NULL;
|
||||
static LPD3D10COMPILEEFFECTFROMMEMORY sFnPtr_D3D10CompileEffectFromMemory = NULL;
|
||||
static LPD3D10CREATEEFFECTFROMMEMORY sFnPtr_D3D10CreateEffectFromMemory = NULL;
|
||||
static LPD3D10CREATEEFFECTPOOLFROMMEMORY sFnPtr_D3D10CreateEffectPoolFromMemory = NULL;
|
||||
static LPD3D10CREATEDEVICEANDSWAPCHAIN sFnPtr_D3D10CreateDeviceAndSwapChain = NULL;
|
||||
static LPD3D10CREATEDEVICEANDSWAPCHAIN1 sFnPtr_D3D10CreateDeviceAndSwapChain1 = NULL;
|
||||
|
||||
// unload the D3D10 DLLs
|
||||
static bool dynlinkUnloadD3D10API(void)
|
||||
{
|
||||
if (g_hModD3D10)
|
||||
{
|
||||
FreeLibrary(g_hModD3D10);
|
||||
g_hModD3D10 = NULL;
|
||||
}
|
||||
|
||||
if (g_hModDXGI)
|
||||
{
|
||||
FreeLibrary(g_hModDXGI);
|
||||
g_hModDXGI = NULL;
|
||||
}
|
||||
|
||||
if (g_hModD3D101)
|
||||
{
|
||||
FreeLibrary(g_hModD3D101);
|
||||
g_hModD3D101 = NULL;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Dynamically load the D3D10 DLLs loaded and map the function pointers
|
||||
static bool dynlinkLoadD3D10API(void)
|
||||
{
|
||||
// First check to see if the D3D10 Library is present.
|
||||
// if it succeeds, then we can call GetProcAddress to grab all of the DX10 functions
|
||||
g_hModD3D10 = LoadLibrary("d3d10.dll");
|
||||
|
||||
if (g_hModD3D10 != NULL)
|
||||
{
|
||||
sFnPtr_D3D10CreateStateBlock = (LPD3D10CREATESTATEBLOCK) GetProcAddress(g_hModD3D10, "D3D10CreateStateBlock");
|
||||
sFnPtr_D3D10CreateDevice = (LPD3D10CREATEDEVICE) GetProcAddress(g_hModD3D10, "D3D10CreateDevice");
|
||||
|
||||
sFnPtr_D3D10StateBlockMaskUnion = (LPD3D10STATEBLOCKMASKUNION) GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskUnion");
|
||||
sFnPtr_D3D10StateBlockMaskIntersect = (LPD3D10STATEBLOCKMASKINTERSECT) GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskIntersect");
|
||||
sFnPtr_D3D10StateBlockMaskDifference = (LPD3D10STATEBLOCKMASKDIFFERENCE) GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskDifference");
|
||||
sFnPtr_D3D10StateBlockMaskEnableCapture = (LPD3D10STATEBLOCKMASKENABLECAPTURE) GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskEnableCapture");
|
||||
sFnPtr_D3D10StateBlockMaskDisableCapture = (LPD3D10STATEBLOCKMASKDISABLECAPTURE)GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskDisableCapture");
|
||||
|
||||
sFnPtr_D3D10StateBlockMaskEnableAll = (LPD3D10STATEBLOCKMASKENABLEALL) GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskEnableAll");
|
||||
sFnPtr_D3D10StateBlockMaskDisableAll = (LPD3D10STATEBLOCKMASKDISABLEALL) GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskDisableAll");
|
||||
sFnPtr_D3D10StateBlockMaskGetSetting = (LPD3D10STATEBLOCKMASKGETSETTING) GetProcAddress(g_hModD3D10, "D3D10StateBlockMaskGetSetting");
|
||||
|
||||
sFnPtr_D3D10CompileEffectFromMemory = (LPD3D10COMPILEEFFECTFROMMEMORY) GetProcAddress(g_hModD3D10, "D3D10CompileEffectFromMemory");
|
||||
sFnPtr_D3D10CreateEffectFromMemory = (LPD3D10CREATEEFFECTFROMMEMORY) GetProcAddress(g_hModD3D10, "D3D10CreateEffectFromMemory");
|
||||
sFnPtr_D3D10CreateEffectPoolFromMemory = (LPD3D10CREATEEFFECTPOOLFROMMEMORY) GetProcAddress(g_hModD3D10, "D3D10CreateEffectPoolFromMemory");
|
||||
|
||||
sFnPtr_D3D10CreateDeviceAndSwapChain = (LPD3D10CREATEDEVICEANDSWAPCHAIN) GetProcAddress(g_hModD3D10, "D3D10CreateDeviceAndSwapChain");
|
||||
}
|
||||
|
||||
g_hModDXGI = LoadLibrary("dxgi.dll");
|
||||
|
||||
if (g_hModDXGI)
|
||||
{
|
||||
sFnPtr_CreateDXGIFactory = (LPCREATEDXGIFACTORY) GetProcAddress(g_hModDXGI , "CreateDXGIFactory");
|
||||
}
|
||||
|
||||
// This may fail if this machine isn't Windows Vista SP1 or later
|
||||
g_hModD3D101 = LoadLibrary("d3d10_1.dll");
|
||||
|
||||
if (g_hModD3D101 != NULL)
|
||||
{
|
||||
sFnPtr_D3D10CreateDevice1 = (LPD3D10CREATEDEVICE1) GetProcAddress(g_hModD3D101, "D3D10CreateDevice1");
|
||||
sFnPtr_D3D10CreateDeviceAndSwapChain1 = (LPD3D10CREATEDEVICEANDSWAPCHAIN1) GetProcAddress(g_hModD3D101, "D3D10CreateDeviceAndSwapChain1");
|
||||
}
|
||||
|
||||
if (g_hModD3D10 == NULL || g_hModDXGI == NULL || g_hModD3D101 == NULL)
|
||||
{
|
||||
dynlinkUnloadD3D10API();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -665,6 +665,7 @@ inline int _ConvertSMVer2Cores(int major, int minor) {
|
|||
{0x75, 64},
|
||||
{0x80, 64},
|
||||
{0x86, 128},
|
||||
{0x87, 128},
|
||||
{-1, -1}};
|
||||
|
||||
int index = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -113,6 +113,7 @@ inline int _ConvertSMVer2CoresDRV(int major, int minor) {
|
|||
{0x75, 64},
|
||||
{0x80, 64},
|
||||
{0x86, 128},
|
||||
{0x87, 128},
|
||||
{-1, -1}};
|
||||
|
||||
int index = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -399,10 +399,10 @@ int getInputDir(std::string &input_dir, const char *executable_path) {
|
|||
// Search in default paths for input images.
|
||||
std::string pathname = "";
|
||||
const char *searchPath[] = {
|
||||
"./images", "../../../../Samples/<executable_name>/images",
|
||||
"../../../Samples/<executable_name>/images",
|
||||
"../../Samples/<executable_name>/images"};
|
||||
|
||||
"./images",
|
||||
"../../../../Samples/4_CUDA_Libraries/<executable_name>/images",
|
||||
"../../../Samples/4_CUDA_Libraries/<executable_name>/images",
|
||||
"../../Samples/4_CUDA_Libraries/<executable_name>/images"};
|
||||
|
||||
for (unsigned int i = 0; i < sizeof(searchPath) / sizeof(char *); ++i) {
|
||||
std::string pathname(searchPath[i]);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -285,14 +285,73 @@ inline char *sdkFindFilePath(const char *filename,
|
|||
// the .exe file, a .bat file launching an .exe, a browser .exe launching the
|
||||
// .exe or .bat, etc
|
||||
const char *searchPath[] = {
|
||||
"./", // same dir
|
||||
"./", // same dir
|
||||
"./data/", // same dir
|
||||
|
||||
"../../../../Samples/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/0_Introduction/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/0_Introduction/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/0_Introduction/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/1_Utilities/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/1_Utilities/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/1_Utilities/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/2_Concepts_and_Techniques/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/2_Concepts_and_Techniques/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/2_Concepts_and_Techniques/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/3_CUDA_Features/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/3_CUDA_Features/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/3_CUDA_Features/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/4_CUDA_Libraries/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/4_CUDA_Libraries/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/4_CUDA_Libraries/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/5_Domain_Specific/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/5_Domain_Specific/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/5_Domain_Specific/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/6_Performance/<executable_name>/", // up 4 in tree
|
||||
"../../../Samples/6_Performance/<executable_name>/", // up 3 in tree
|
||||
"../../Samples/6_Performance/<executable_name>/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/0_Introduction/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/0_Introduction/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/0_Introduction/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/1_Utilities/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/1_Utilities/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/1_Utilities/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/2_Concepts_and_Techniques/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/2_Concepts_and_Techniques/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/2_Concepts_and_Techniques/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/3_CUDA_Features/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/3_CUDA_Features/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/3_CUDA_Features/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/4_CUDA_Libraries/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/4_CUDA_Libraries/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/4_CUDA_Libraries/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/5_Domain_Specific/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/5_Domain_Specific/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/5_Domain_Specific/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Samples/6_Performance/<executable_name>/data/", // up 4 in tree
|
||||
"../../../Samples/6_Performance/<executable_name>/data/", // up 3 in tree
|
||||
"../../Samples/6_Performance/<executable_name>/data/", // up 2 in tree
|
||||
|
||||
"../../../../Common/data/", // up 4 in tree
|
||||
"../../../Common/data/", // up 3 in tree
|
||||
"../../Common/data/" // up 2 in tree
|
||||
|
@ -362,6 +421,7 @@ inline char *sdkFindFilePath(const char *filename,
|
|||
}
|
||||
|
||||
// File not found
|
||||
printf("\nerror: sdkFindFilePath: file <%s> not found!\n", filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
78
Common/multithreading.cpp
Normal file
78
Common/multithreading.cpp
Normal file
|
@ -0,0 +1,78 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <multithreading.h>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
|
||||
// Create thread
|
||||
CUTThread cutStartThread(CUT_THREADROUTINE func, void *data) {
|
||||
return CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, data, 0, NULL);
|
||||
}
|
||||
|
||||
// Wait for thread to finish
|
||||
void cutEndThread(CUTThread thread) {
|
||||
WaitForSingleObject(thread, INFINITE);
|
||||
CloseHandle(thread);
|
||||
}
|
||||
|
||||
// Destroy thread
|
||||
void cutDestroyThread(CUTThread thread) {
|
||||
TerminateThread(thread, 0);
|
||||
CloseHandle(thread);
|
||||
}
|
||||
|
||||
// Wait for multiple threads
|
||||
void cutWaitForThreads(const CUTThread *threads, int num) {
|
||||
WaitForMultipleObjects(num, threads, true, INFINITE);
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
CloseHandle(threads[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
// Create thread
|
||||
CUTThread cutStartThread(CUT_THREADROUTINE func, void *data) {
|
||||
pthread_t thread;
|
||||
pthread_create(&thread, NULL, func, data);
|
||||
return thread;
|
||||
}
|
||||
|
||||
// Wait for thread to finish
|
||||
void cutEndThread(CUTThread thread) { pthread_join(thread, NULL); }
|
||||
|
||||
// Destroy thread
|
||||
void cutDestroyThread(CUTThread thread) { pthread_cancel(thread); }
|
||||
|
||||
// Wait for multiple threads
|
||||
void cutWaitForThreads(const CUTThread *threads, int num) {
|
||||
for (int i = 0; i < num; i++) {
|
||||
cutEndThread(threads[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
76
Common/multithreading.h
Normal file
76
Common/multithreading.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef MULTITHREADING_H
|
||||
#define MULTITHREADING_H
|
||||
|
||||
|
||||
//Simple portable thread library.
|
||||
|
||||
//Windows threads.
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
|
||||
#include <windows.h>
|
||||
|
||||
typedef HANDLE CUTThread;
|
||||
typedef unsigned(WINAPI *CUT_THREADROUTINE)(void *);
|
||||
|
||||
#define CUT_THREADPROC unsigned WINAPI
|
||||
#define CUT_THREADEND return 0
|
||||
|
||||
#else
|
||||
//POSIX threads.
|
||||
#include <pthread.h>
|
||||
|
||||
typedef pthread_t CUTThread;
|
||||
typedef void *(*CUT_THREADROUTINE)(void *);
|
||||
|
||||
#define CUT_THREADPROC void
|
||||
#define CUT_THREADEND
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//Create thread.
|
||||
CUTThread cutStartThread(CUT_THREADROUTINE, void *data);
|
||||
|
||||
//Wait for thread to finish.
|
||||
void cutEndThread(CUTThread thread);
|
||||
|
||||
//Destroy thread.
|
||||
void cutDestroyThread(CUTThread thread);
|
||||
|
||||
//Wait for multiple threads.
|
||||
void cutWaitForThreads(const CUTThread *threads, int num);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} //extern "C"
|
||||
#endif
|
||||
|
||||
#endif //MULTITHREADING_H
|
111
Common/nvMath.h
Normal file
111
Common/nvMath.h
Normal file
|
@ -0,0 +1,111 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//
|
||||
// Template math library for common 3D functionality
|
||||
//
|
||||
// This code is in part deriver from glh, a cross platform glut helper library.
|
||||
// The copyright for glh follows this notice.
|
||||
//
|
||||
// Copyright (c) NVIDIA Corporation. All rights reserved.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
Copyright (c) 2000 Cass Everitt
|
||||
Copyright (c) 2000 NVIDIA Corporation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or
|
||||
without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
* The names of contributors to this software may not be used
|
||||
to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Cass Everitt - cass@r3.nu
|
||||
*/
|
||||
|
||||
#ifndef NV_MATH_H
|
||||
#define NV_MATH_H
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <nvVector.h>
|
||||
#include <nvMatrix.h>
|
||||
#include <nvQuaternion.h>
|
||||
|
||||
#define NV_PI float(3.1415926535897932384626433832795)
|
||||
|
||||
namespace nv
|
||||
{
|
||||
|
||||
typedef vec2<float> vec2f;
|
||||
typedef vec3<float> vec3f;
|
||||
typedef vec3<int> vec3i;
|
||||
typedef vec3<unsigned int> vec3ui;
|
||||
typedef vec4<float> vec4f;
|
||||
typedef matrix4<float> matrix4f;
|
||||
typedef quaternion<float> quaternionf;
|
||||
|
||||
|
||||
inline void applyRotation(const quaternionf &r)
|
||||
{
|
||||
float angle;
|
||||
vec3f axis;
|
||||
r.get_value(axis, angle);
|
||||
glRotatef(angle/3.1415926f * 180.0f, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
540
Common/nvMatrix.h
Normal file
540
Common/nvMatrix.h
Normal file
|
@ -0,0 +1,540 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//
|
||||
// Template math library for common 3D functionality
|
||||
//
|
||||
// nvMatrix.h - template matrix code
|
||||
//
|
||||
// This code is in part deriver from glh, a cross platform glut helper library.
|
||||
// The copyright for glh follows this notice.
|
||||
//
|
||||
// Copyright (c) NVIDIA Corporation. All rights reserved.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
Copyright (c) 2000 Cass Everitt
|
||||
Copyright (c) 2000 NVIDIA Corporation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or
|
||||
without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
* The names of contributors to this software may not be used
|
||||
to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Cass Everitt - cass@r3.nu
|
||||
*/
|
||||
|
||||
#ifndef NV_MATRIX_H
|
||||
#define NV_MATRIX_H
|
||||
|
||||
namespace nv
|
||||
{
|
||||
|
||||
template <class T> class vec2;
|
||||
template <class T> class vec3;
|
||||
template <class T> class vec4;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Matrix
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
template<class T>
|
||||
class matrix4
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
matrix4()
|
||||
{
|
||||
make_identity();
|
||||
}
|
||||
|
||||
matrix4(T t)
|
||||
{
|
||||
set_value(t);
|
||||
}
|
||||
|
||||
matrix4(const T *m)
|
||||
{
|
||||
set_value(m);
|
||||
}
|
||||
|
||||
matrix4(T a00, T a01, T a02, T a03,
|
||||
T a10, T a11, T a12, T a13,
|
||||
T a20, T a21, T a22, T a23,
|
||||
T a30, T a31, T a32, T a33) :
|
||||
_11(a00), _12(a01), _13(a02), _14(a03),
|
||||
_21(a10), _22(a11), _23(a12), _24(a13),
|
||||
_31(a20), _32(a21), _33(a22), _34(a23),
|
||||
_41(a30), _42(a31), _43(a32), _44(a33)
|
||||
{}
|
||||
|
||||
|
||||
void get_value(T *mp) const
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
for (int j=0; j < 4; j++)
|
||||
for (int i=0; i < 4; i++)
|
||||
{
|
||||
mp[c++] = element(i,j);
|
||||
}
|
||||
}
|
||||
|
||||
const T *get_value() const
|
||||
{
|
||||
return _array;
|
||||
}
|
||||
|
||||
void set_value(T *mp)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
for (int j=0; j < 4; j++)
|
||||
for (int i=0; i < 4; i++)
|
||||
{
|
||||
element(i,j) = mp[c++];
|
||||
}
|
||||
}
|
||||
|
||||
void set_value(T r)
|
||||
{
|
||||
for (int i=0; i < 4; i++)
|
||||
for (int j=0; j < 4; j++)
|
||||
{
|
||||
element(i,j) = r;
|
||||
}
|
||||
}
|
||||
|
||||
void make_identity()
|
||||
{
|
||||
element(0,0) = 1.0;
|
||||
element(0,1) = 0.0;
|
||||
element(0,2) = 0.0;
|
||||
element(0,3) = 0.0;
|
||||
|
||||
element(1,0) = 0.0;
|
||||
element(1,1) = 1.0;
|
||||
element(1,2) = 0.0;
|
||||
element(1,3) = 0.0;
|
||||
|
||||
element(2,0) = 0.0;
|
||||
element(2,1) = 0.0;
|
||||
element(2,2) = 1.0;
|
||||
element(2,3) = 0.0;
|
||||
|
||||
element(3,0) = 0.0;
|
||||
element(3,1) = 0.0;
|
||||
element(3,2) = 0.0;
|
||||
element(3,3) = 1.0;
|
||||
}
|
||||
|
||||
// set a uniform scale
|
||||
void set_scale(T s)
|
||||
{
|
||||
element(0,0) = s;
|
||||
element(1,1) = s;
|
||||
element(2,2) = s;
|
||||
}
|
||||
|
||||
void set_scale(const vec3<T> &s)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
element(i,i) = s[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_translate(const vec3<T> &t)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
element(i,3) = t[i];
|
||||
}
|
||||
}
|
||||
|
||||
void set_row(int r, const vec4<T> &t)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
element(r,i) = t[i];
|
||||
}
|
||||
}
|
||||
|
||||
void set_column(int c, const vec4<T> &t)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
element(i,c) = t[i];
|
||||
}
|
||||
}
|
||||
|
||||
vec4<T> get_row(int r) const
|
||||
{
|
||||
vec4<T> v;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
v[i] = element(r,i);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
vec4<T> get_column(int c) const
|
||||
{
|
||||
vec4<T> v;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
v[i] = element(i,c);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
friend matrix4 inverse(const matrix4 &m)
|
||||
{
|
||||
matrix4 minv;
|
||||
|
||||
T r1[8], r2[8], r3[8], r4[8];
|
||||
T *s[4], *tmprow;
|
||||
|
||||
s[0] = &r1[0];
|
||||
s[1] = &r2[0];
|
||||
s[2] = &r3[0];
|
||||
s[3] = &r4[0];
|
||||
|
||||
register int i,j,p,jj;
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
for (j=0; j<4; j++)
|
||||
{
|
||||
s[i][j] = m.element(i,j);
|
||||
|
||||
if (i==j)
|
||||
{
|
||||
s[i][j+4] = 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
s[i][j+4] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T scp[4];
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
scp[i] = T(fabs(s[i][0]));
|
||||
|
||||
for (j=1; j<4; j++)
|
||||
if (T(fabs(s[i][j])) > scp[i])
|
||||
{
|
||||
scp[i] = T(fabs(s[i][j]));
|
||||
}
|
||||
|
||||
if (scp[i] == 0.0)
|
||||
{
|
||||
return minv; // singular matrix!
|
||||
}
|
||||
}
|
||||
|
||||
int pivot_to;
|
||||
T scp_max;
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
// select pivot row
|
||||
pivot_to = i;
|
||||
scp_max = T(fabs(s[i][i]/scp[i]));
|
||||
|
||||
// find out which row should be on top
|
||||
for (p=i+1; p<4; p++)
|
||||
if (T(fabs(s[p][i]/scp[p])) > scp_max)
|
||||
{
|
||||
scp_max = T(fabs(s[p][i]/scp[p]));
|
||||
pivot_to = p;
|
||||
}
|
||||
|
||||
// Pivot if necessary
|
||||
if (pivot_to != i)
|
||||
{
|
||||
tmprow = s[i];
|
||||
s[i] = s[pivot_to];
|
||||
s[pivot_to] = tmprow;
|
||||
T tmpscp;
|
||||
tmpscp = scp[i];
|
||||
scp[i] = scp[pivot_to];
|
||||
scp[pivot_to] = tmpscp;
|
||||
}
|
||||
|
||||
T mji;
|
||||
|
||||
// perform gaussian elimination
|
||||
for (j=i+1; j<4; j++)
|
||||
{
|
||||
mji = s[j][i]/s[i][i];
|
||||
s[j][i] = 0.0;
|
||||
|
||||
for (jj=i+1; jj<8; jj++)
|
||||
{
|
||||
s[j][jj] -= mji*s[i][jj];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (s[3][3] == 0.0)
|
||||
{
|
||||
return minv; // singular matrix!
|
||||
}
|
||||
|
||||
//
|
||||
// Now we have an upper triangular matrix.
|
||||
//
|
||||
// x x x x | y y y y
|
||||
// 0 x x x | y y y y
|
||||
// 0 0 x x | y y y y
|
||||
// 0 0 0 x | y y y y
|
||||
//
|
||||
// we'll back substitute to get the inverse
|
||||
//
|
||||
// 1 0 0 0 | z z z z
|
||||
// 0 1 0 0 | z z z z
|
||||
// 0 0 1 0 | z z z z
|
||||
// 0 0 0 1 | z z z z
|
||||
//
|
||||
|
||||
T mij;
|
||||
|
||||
for (i=3; i>0; i--)
|
||||
{
|
||||
for (j=i-1; j > -1; j--)
|
||||
{
|
||||
mij = s[j][i]/s[i][i];
|
||||
|
||||
for (jj=j+1; jj<8; jj++)
|
||||
{
|
||||
s[j][jj] -= mij*s[i][jj];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
for (j=0; j<4; j++)
|
||||
{
|
||||
minv(i,j) = s[i][j+4] / s[i][i];
|
||||
}
|
||||
|
||||
return minv;
|
||||
}
|
||||
|
||||
|
||||
friend matrix4 transpose(const matrix4 &m)
|
||||
{
|
||||
matrix4 mtrans;
|
||||
|
||||
for (int i=0; i<4; i++)
|
||||
for (int j=0; j<4; j++)
|
||||
{
|
||||
mtrans(i,j) = m.element(j,i);
|
||||
}
|
||||
|
||||
return mtrans;
|
||||
}
|
||||
|
||||
matrix4 &operator *= (const matrix4 &rhs)
|
||||
{
|
||||
matrix4 mt(*this);
|
||||
set_value(T(0));
|
||||
|
||||
for (int i=0; i < 4; i++)
|
||||
for (int j=0; j < 4; j++)
|
||||
for (int c=0; c < 4; c++)
|
||||
{
|
||||
element(i,j) += mt(i,c) * rhs(c,j);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend matrix4 operator * (const matrix4 &lhs, const matrix4 &rhs)
|
||||
{
|
||||
matrix4 r(T(0));
|
||||
|
||||
for (int i=0; i < 4; i++)
|
||||
for (int j=0; j < 4; j++)
|
||||
for (int c=0; c < 4; c++)
|
||||
{
|
||||
r.element(i,j) += lhs(i,c) * rhs(c,j);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
// dst = M * src
|
||||
vec4<T> operator *(const vec4<T> &src) const
|
||||
{
|
||||
vec4<T> r;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
r[i] = (src[0] * element(i,0) + src[1] * element(i,1) +
|
||||
src[2] * element(i,2) + src[3] * element(i,3));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
// dst = src * M
|
||||
friend vec4<T> operator *(const vec4<T> &lhs, const matrix4 &rhs)
|
||||
{
|
||||
vec4<T> r;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
r[i] = (lhs[0] * rhs.element(0,i) + lhs[1] * rhs.element(1,i) +
|
||||
lhs[2] * rhs.element(2,i) + lhs[3] * rhs.element(3,i));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
T &operator()(int row, int col)
|
||||
{
|
||||
return element(row,col);
|
||||
}
|
||||
|
||||
const T &operator()(int row, int col) const
|
||||
{
|
||||
return element(row,col);
|
||||
}
|
||||
|
||||
T &element(int row, int col)
|
||||
{
|
||||
return _array[row | (col<<2)];
|
||||
}
|
||||
|
||||
const T &element(int row, int col) const
|
||||
{
|
||||
return _array[row | (col<<2)];
|
||||
}
|
||||
|
||||
matrix4 &operator *= (const T &r)
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
element(0,i) *= r;
|
||||
element(1,i) *= r;
|
||||
element(2,i) *= r;
|
||||
element(3,i) *= r;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
matrix4 &operator += (const matrix4 &mat)
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
element(0,i) += mat.element(0,i);
|
||||
element(1,i) += mat.element(1,i);
|
||||
element(2,i) += mat.element(2,i);
|
||||
element(3,i) += mat.element(3,i);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
friend bool operator == (const matrix4 &lhs, const matrix4 &rhs)
|
||||
{
|
||||
bool r = true;
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
r &= lhs._array[i] == rhs._array[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
friend bool operator != (const matrix4 &lhs, const matrix4 &rhs)
|
||||
{
|
||||
bool r = true;
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
r &= lhs._array[i] != rhs._array[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
T _11, _12, _13, _14; // standard names for components
|
||||
T _21, _22, _23, _24; // standard names for components
|
||||
T _31, _32, _33, _34; // standard names for components
|
||||
T _41, _42, _43, _44; // standard names for components
|
||||
};
|
||||
T _array[16]; // array access
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
530
Common/nvQuaternion.h
Normal file
530
Common/nvQuaternion.h
Normal file
|
@ -0,0 +1,530 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//
|
||||
// Template math library for common 3D functionality
|
||||
//
|
||||
// nvQuaterion.h - quaternion template and utility functions
|
||||
//
|
||||
// This code is in part deriver from glh, a cross platform glut helper library.
|
||||
// The copyright for glh follows this notice.
|
||||
//
|
||||
// Copyright (c) NVIDIA Corporation. All rights reserved.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
Copyright (c) 2000 Cass Everitt
|
||||
Copyright (c) 2000 NVIDIA Corporation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or
|
||||
without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
* The names of contributors to this software may not be used
|
||||
to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Cass Everitt - cass@r3.nu
|
||||
*/
|
||||
#ifndef NV_QUATERNION_H
|
||||
#define NV_QUATERNION_H
|
||||
|
||||
namespace nv
|
||||
{
|
||||
|
||||
template <class T> class vec2;
|
||||
template <class T> class vec3;
|
||||
template <class T> class vec4;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Quaternion
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< class T>
|
||||
class quaternion
|
||||
{
|
||||
public:
|
||||
|
||||
quaternion() : x(0.0), y(0.0), z(0.0), w(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
quaternion(const T v[4])
|
||||
{
|
||||
set_value(v);
|
||||
}
|
||||
|
||||
|
||||
quaternion(T q0, T q1, T q2, T q3)
|
||||
{
|
||||
set_value(q0, q1, q2, q3);
|
||||
}
|
||||
|
||||
|
||||
quaternion(const matrix4<T> &m)
|
||||
{
|
||||
set_value(m);
|
||||
}
|
||||
|
||||
|
||||
quaternion(const vec3<T> &axis, T radians)
|
||||
{
|
||||
set_value(axis, radians);
|
||||
}
|
||||
|
||||
|
||||
quaternion(const vec3<T> &rotateFrom, const vec3<T> &rotateTo)
|
||||
{
|
||||
set_value(rotateFrom, rotateTo);
|
||||
}
|
||||
|
||||
quaternion(const vec3<T> &from_look, const vec3<T> &from_up,
|
||||
const vec3<T> &to_look, const vec3<T> &to_up)
|
||||
{
|
||||
set_value(from_look, from_up, to_look, to_up);
|
||||
}
|
||||
|
||||
const T *get_value() const
|
||||
{
|
||||
return &_array[0];
|
||||
}
|
||||
|
||||
void get_value(T &q0, T &q1, T &q2, T &q3) const
|
||||
{
|
||||
q0 = _array[0];
|
||||
q1 = _array[1];
|
||||
q2 = _array[2];
|
||||
q3 = _array[3];
|
||||
}
|
||||
|
||||
quaternion &set_value(T q0, T q1, T q2, T q3)
|
||||
{
|
||||
_array[0] = q0;
|
||||
_array[1] = q1;
|
||||
_array[2] = q2;
|
||||
_array[3] = q3;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void get_value(vec3<T> &axis, T &radians) const
|
||||
{
|
||||
radians = T(acos(_array[3]) * T(2.0));
|
||||
|
||||
if (radians == T(0.0))
|
||||
{
|
||||
axis = vec3<T>(0.0, 0.0, 1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
axis[0] = _array[0];
|
||||
axis[1] = _array[1];
|
||||
axis[2] = _array[2];
|
||||
axis = normalize(axis);
|
||||
}
|
||||
}
|
||||
|
||||
void get_value(matrix4<T> &m) const
|
||||
{
|
||||
T s, xs, ys, zs, wx, wy, wz, xx, xy, xz, yy, yz, zz;
|
||||
|
||||
T norm = _array[0] * _array[0] + _array[1] * _array[1] + _array[2] * _array[2] + _array[3] * _array[3];
|
||||
|
||||
s = (norm == T(0.0)) ? T(0.0) : (T(2.0) / norm);
|
||||
|
||||
xs = _array[0] * s;
|
||||
ys = _array[1] * s;
|
||||
zs = _array[2] * s;
|
||||
|
||||
wx = _array[3] * xs;
|
||||
wy = _array[3] * ys;
|
||||
wz = _array[3] * zs;
|
||||
|
||||
xx = _array[0] * xs;
|
||||
xy = _array[0] * ys;
|
||||
xz = _array[0] * zs;
|
||||
|
||||
yy = _array[1] * ys;
|
||||
yz = _array[1] * zs;
|
||||
zz = _array[2] * zs;
|
||||
|
||||
m(0,0) = T(T(1.0) - (yy + zz));
|
||||
m(1,0) = T(xy + wz);
|
||||
m(2,0) = T(xz - wy);
|
||||
|
||||
m(0,1) = T(xy - wz);
|
||||
m(1,1) = T(T(1.0) - (xx + zz));
|
||||
m(2,1) = T(yz + wx);
|
||||
|
||||
m(0,2) = T(xz + wy);
|
||||
m(1,2) = T(yz - wx);
|
||||
m(2,2) = T(T(1.0) - (xx + yy));
|
||||
|
||||
m(3,0) = m(3,1) = m(3,2) = m(0,3) = m(1,3) = m(2,3) = T(0.0);
|
||||
m(3,3) = T(1.0);
|
||||
}
|
||||
|
||||
quaternion &set_value(const T *qp)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
_array[i] = qp[i];
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
quaternion &set_value(const matrix4<T> &m)
|
||||
{
|
||||
T tr, s;
|
||||
int i, j, k;
|
||||
const int nxt[3] = { 1, 2, 0 };
|
||||
|
||||
tr = m(0,0) + m(1,1) + m(2,2);
|
||||
|
||||
if (tr > T(0))
|
||||
{
|
||||
s = T(sqrt(tr + m(3,3)));
|
||||
_array[3] = T(s * 0.5);
|
||||
s = T(0.5) / s;
|
||||
|
||||
_array[0] = T((m(1,2) - m(2,1)) * s);
|
||||
_array[1] = T((m(2,0) - m(0,2)) * s);
|
||||
_array[2] = T((m(0,1) - m(1,0)) * s);
|
||||
}
|
||||
else
|
||||
{
|
||||
i = 0;
|
||||
|
||||
if (m(1,1) > m(0,0))
|
||||
{
|
||||
i = 1;
|
||||
}
|
||||
|
||||
if (m(2,2) > m(i,i))
|
||||
{
|
||||
i = 2;
|
||||
}
|
||||
|
||||
j = nxt[i];
|
||||
k = nxt[j];
|
||||
|
||||
s = T(sqrt((m(i,j) - (m(j,j) + m(k,k))) + T(1.0)));
|
||||
|
||||
_array[i] = T(s * 0.5);
|
||||
s = T(0.5 / s);
|
||||
|
||||
_array[3] = T((m(j,k) - m(k,j)) * s);
|
||||
_array[j] = T((m(i,j) + m(j,i)) * s);
|
||||
_array[k] = T((m(i,k) + m(k,i)) * s);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
quaternion &set_value(const vec3<T> &axis, T theta)
|
||||
{
|
||||
T sqnorm = square_norm(axis);
|
||||
|
||||
if (sqnorm == T(0.0))
|
||||
{
|
||||
// axis too small.
|
||||
x = y = z = T(0.0);
|
||||
w = T(1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
theta *= T(0.5);
|
||||
T sin_theta = T(sin(theta));
|
||||
|
||||
if (sqnorm != T(1))
|
||||
{
|
||||
sin_theta /= T(sqrt(sqnorm));
|
||||
}
|
||||
|
||||
x = sin_theta * axis[0];
|
||||
y = sin_theta * axis[1];
|
||||
z = sin_theta * axis[2];
|
||||
w = T(cos(theta));
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
quaternion &set_value(const vec3<T> &rotateFrom, const vec3<T> &rotateTo)
|
||||
{
|
||||
vec3<T> p1, p2;
|
||||
T alpha;
|
||||
|
||||
p1 = normalize(rotateFrom);
|
||||
p2 = normalize(rotateTo);
|
||||
|
||||
alpha = dot(p1, p2);
|
||||
|
||||
if (alpha == T(1.0))
|
||||
{
|
||||
*this = quaternion();
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ensures that the anti-parallel case leads to a positive dot
|
||||
if (alpha == T(-1.0))
|
||||
{
|
||||
vec3<T> v;
|
||||
|
||||
if (p1[0] != p1[1] || p1[0] != p1[2])
|
||||
{
|
||||
v = vec3<T>(p1[1], p1[2], p1[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
v = vec3<T>(-p1[0], p1[1], p1[2]);
|
||||
}
|
||||
|
||||
v -= p1 * dot(p1, v);
|
||||
v = normalize(v);
|
||||
|
||||
set_value(v, T(3.1415926));
|
||||
return *this;
|
||||
}
|
||||
|
||||
p1 = normalize(cross(p1, p2));
|
||||
|
||||
set_value(p1,T(acos(alpha)));
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
quaternion &set_value(const vec3<T> &from_look, const vec3<T> &from_up,
|
||||
const vec3<T> &to_look, const vec3<T> &to_up)
|
||||
{
|
||||
quaternion r_look = quaternion(from_look, to_look);
|
||||
|
||||
vec3<T> rotated_from_up(from_up);
|
||||
r_look.mult_vec(rotated_from_up);
|
||||
|
||||
quaternion r_twist = quaternion(rotated_from_up, to_up);
|
||||
|
||||
*this = r_twist;
|
||||
*this *= r_look;
|
||||
return *this;
|
||||
}
|
||||
|
||||
quaternion &operator *= (const quaternion<T> &qr)
|
||||
{
|
||||
quaternion ql(*this);
|
||||
|
||||
w = ql.w * qr.w - ql.x * qr.x - ql.y * qr.y - ql.z * qr.z;
|
||||
x = ql.w * qr.x + ql.x * qr.w + ql.y * qr.z - ql.z * qr.y;
|
||||
y = ql.w * qr.y + ql.y * qr.w + ql.z * qr.x - ql.x * qr.z;
|
||||
z = ql.w * qr.z + ql.z * qr.w + ql.x * qr.y - ql.y * qr.x;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend quaternion normalize(const quaternion<T> &q)
|
||||
{
|
||||
quaternion r(q);
|
||||
T rnorm = T(1.0) / T(sqrt(q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z));
|
||||
|
||||
r.x *= rnorm;
|
||||
r.y *= rnorm;
|
||||
r.z *= rnorm;
|
||||
r.w *= rnorm;
|
||||
}
|
||||
|
||||
friend quaternion<T> conjugate(const quaternion<T> &q)
|
||||
{
|
||||
quaternion<T> r(q);
|
||||
r._array[0] *= T(-1.0);
|
||||
r._array[1] *= T(-1.0);
|
||||
r._array[2] *= T(-1.0);
|
||||
return r;
|
||||
}
|
||||
|
||||
friend quaternion<T> inverse(const quaternion<T> &q)
|
||||
{
|
||||
return conjugate(q);
|
||||
}
|
||||
|
||||
//
|
||||
// Quaternion multiplication with cartesian vector
|
||||
// v' = q*v*q(star)
|
||||
//
|
||||
void mult_vec(const vec3<T> &src, vec3<T> &dst) const
|
||||
{
|
||||
T v_coef = w * w - x * x - y * y - z * z;
|
||||
T u_coef = T(2.0) * (src[0] * x + src[1] * y + src[2] * z);
|
||||
T c_coef = T(2.0) * w;
|
||||
|
||||
dst.v[0] = v_coef * src.v[0] + u_coef * x + c_coef * (y * src.v[2] - z * src.v[1]);
|
||||
dst.v[1] = v_coef * src.v[1] + u_coef * y + c_coef * (z * src.v[0] - x * src.v[2]);
|
||||
dst.v[2] = v_coef * src.v[2] + u_coef * z + c_coef * (x * src.v[1] - y * src.v[0]);
|
||||
}
|
||||
|
||||
void mult_vec(vec3<T> &src_and_dst) const
|
||||
{
|
||||
mult_vec(vec3<T>(src_and_dst), src_and_dst);
|
||||
}
|
||||
|
||||
void scale_angle(T scaleFactor)
|
||||
{
|
||||
vec3<T> axis;
|
||||
T radians;
|
||||
|
||||
get_value(axis, radians);
|
||||
radians *= scaleFactor;
|
||||
set_value(axis, radians);
|
||||
}
|
||||
|
||||
friend quaternion<T> slerp(const quaternion<T> &p, const quaternion<T> &q, T alpha)
|
||||
{
|
||||
quaternion r;
|
||||
|
||||
T cos_omega = p.x * q.x + p.y * q.y + p.z * q.z + p.w * q.w;
|
||||
// if B is on opposite hemisphere from A, use -B instead
|
||||
|
||||
int bflip;
|
||||
|
||||
if ((bflip = (cos_omega < T(0))))
|
||||
{
|
||||
cos_omega = -cos_omega;
|
||||
}
|
||||
|
||||
// complementary interpolation parameter
|
||||
T beta = T(1) - alpha;
|
||||
|
||||
if (cos_omega >= T(1))
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
T omega = T(acos(cos_omega));
|
||||
T one_over_sin_omega = T(1.0) / T(sin(omega));
|
||||
|
||||
beta = T(sin(omega*beta) * one_over_sin_omega);
|
||||
alpha = T(sin(omega*alpha) * one_over_sin_omega);
|
||||
|
||||
if (bflip)
|
||||
{
|
||||
alpha = -alpha;
|
||||
}
|
||||
|
||||
r.x = beta * p._array[0]+ alpha * q._array[0];
|
||||
r.y = beta * p._array[1]+ alpha * q._array[1];
|
||||
r.z = beta * p._array[2]+ alpha * q._array[2];
|
||||
r.w = beta * p._array[3]+ alpha * q._array[3];
|
||||
return r;
|
||||
}
|
||||
|
||||
T &operator [](int i)
|
||||
{
|
||||
return _array[i];
|
||||
}
|
||||
|
||||
const T &operator [](int i) const
|
||||
{
|
||||
return _array[i];
|
||||
}
|
||||
|
||||
|
||||
friend bool operator == (const quaternion<T> &lhs, const quaternion<T> &rhs)
|
||||
{
|
||||
bool r = true;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
r &= lhs._array[i] == rhs._array[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
friend bool operator != (const quaternion<T> &lhs, const quaternion<T> &rhs)
|
||||
{
|
||||
bool r = true;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
r &= lhs._array[i] == rhs._array[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
friend quaternion<T> operator * (const quaternion<T> &lhs, const quaternion<T> &rhs)
|
||||
{
|
||||
quaternion r(lhs);
|
||||
r *= rhs;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
T x;
|
||||
T y;
|
||||
T z;
|
||||
T w;
|
||||
};
|
||||
T _array[4];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
260
Common/nvShaderUtils.h
Normal file
260
Common/nvShaderUtils.h
Normal file
|
@ -0,0 +1,260 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Utility functions for compiling shaders and programs
|
||||
*
|
||||
* Author: Evan Hart
|
||||
* Copyright (c) NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef NV_SHADER_UTILS_H
|
||||
#define NV_SHADER_UTILS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace nv {
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
inline GLuint CompileGLSLShader(GLenum target, const char *shader) {
|
||||
GLuint object;
|
||||
|
||||
object = glCreateShader(target);
|
||||
|
||||
if (!object) {
|
||||
return object;
|
||||
}
|
||||
|
||||
glShaderSource(object, 1, &shader, NULL);
|
||||
|
||||
glCompileShader(object);
|
||||
|
||||
// check if shader compiled
|
||||
GLint compiled = 0;
|
||||
glGetShaderiv(object, GL_COMPILE_STATUS, &compiled);
|
||||
|
||||
if (!compiled) {
|
||||
#ifdef NV_REPORT_COMPILE_ERRORS
|
||||
char temp[256] = "";
|
||||
glGetShaderInfoLog(object, 256, NULL, temp);
|
||||
fprintf(stderr, "Compile failed:\n%s\n", temp);
|
||||
#endif
|
||||
glDeleteShader(object);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
inline GLuint CompileGLSLShaderFromFile(GLenum target, const char *filename) {
|
||||
FILE *shaderFile;
|
||||
char *text;
|
||||
long size;
|
||||
size_t fsize = 0;
|
||||
|
||||
// read files as binary to prevent problems from newline translation
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
|
||||
|
||||
if (fopen_s(&shaderFile, filename, "rb") != 0)
|
||||
#else
|
||||
if ((shaderFile = fopen(filename, "rb")) == 0)
|
||||
#endif
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get the length of the file
|
||||
fseek(shaderFile, 0, SEEK_END);
|
||||
size = ftell(shaderFile);
|
||||
|
||||
// Read the file contents from the start, then close file and add a null
|
||||
// terminator
|
||||
fseek(shaderFile, 0, SEEK_SET);
|
||||
text = new char[size + 1];
|
||||
fsize = fread(text, size, 1, shaderFile);
|
||||
fclose(shaderFile);
|
||||
|
||||
if (fsize == 0) {
|
||||
printf("CompileGLSLShaderFromFile(), error... fsize = 0\n");
|
||||
}
|
||||
|
||||
text[size] = '\0';
|
||||
|
||||
GLuint object = CompileGLSLShader(target, text);
|
||||
|
||||
delete[] text;
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
// Create a program composed of vertex and fragment shaders.
|
||||
inline GLuint LinkGLSLProgram(GLuint vertexShader, GLuint fragmentShader) {
|
||||
GLuint program = glCreateProgram();
|
||||
glAttachShader(program, vertexShader);
|
||||
glAttachShader(program, fragmentShader);
|
||||
glLinkProgram(program);
|
||||
|
||||
#ifdef NV_REPORT_COMPILE_ERRORS
|
||||
// Get error log.
|
||||
GLint charsWritten, infoLogLength;
|
||||
glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLogLength);
|
||||
|
||||
char *infoLog = new char[infoLogLength];
|
||||
glGetProgramInfoLog(program, infoLogLength, &charsWritten, infoLog);
|
||||
printf(infoLog);
|
||||
delete[] infoLog;
|
||||
#endif
|
||||
|
||||
// Test linker result.
|
||||
GLint linkSucceed = GL_FALSE;
|
||||
glGetProgramiv(program, GL_LINK_STATUS, &linkSucceed);
|
||||
|
||||
if (linkSucceed == GL_FALSE) {
|
||||
glDeleteProgram(program);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
// Create a program composed of vertex, geometry and fragment shaders.
|
||||
inline GLuint LinkGLSLProgram(GLuint vertexShader, GLuint geometryShader,
|
||||
GLint inputType, GLint vertexOut,
|
||||
GLint outputType, GLuint fragmentShader) {
|
||||
GLuint program = glCreateProgram();
|
||||
glAttachShader(program, vertexShader);
|
||||
glAttachShader(program, geometryShader);
|
||||
glProgramParameteriEXT(program, GL_GEOMETRY_INPUT_TYPE_EXT, inputType);
|
||||
glProgramParameteriEXT(program, GL_GEOMETRY_VERTICES_OUT_EXT, vertexOut);
|
||||
glProgramParameteriEXT(program, GL_GEOMETRY_OUTPUT_TYPE_EXT, outputType);
|
||||
glAttachShader(program, fragmentShader);
|
||||
glLinkProgram(program);
|
||||
|
||||
#ifdef NV_REPORT_COMPILE_ERRORS
|
||||
// Get error log.
|
||||
GLint charsWritten, infoLogLength;
|
||||
glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLogLength);
|
||||
|
||||
char *infoLog = new char[infoLogLength];
|
||||
glGetProgramInfoLog(program, infoLogLength, &charsWritten, infoLog);
|
||||
printf(infoLog);
|
||||
delete[] infoLog;
|
||||
#endif
|
||||
|
||||
// Test linker result.
|
||||
GLint linkSucceed = GL_FALSE;
|
||||
glGetProgramiv(program, GL_LINK_STATUS, &linkSucceed);
|
||||
|
||||
if (linkSucceed == GL_FALSE) {
|
||||
glDeleteProgram(program);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
inline GLuint CompileASMShader(GLenum program_type, const char *code) {
|
||||
GLuint program_id;
|
||||
glGenProgramsARB(1, &program_id);
|
||||
glBindProgramARB(program_type, program_id);
|
||||
glProgramStringARB(program_type, GL_PROGRAM_FORMAT_ASCII_ARB,
|
||||
(GLsizei)strlen(code), (GLubyte *)code);
|
||||
|
||||
GLint error_pos;
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &error_pos);
|
||||
|
||||
if (error_pos != -1) {
|
||||
#ifdef NV_REPORT_COMPILE_ERRORS
|
||||
const GLubyte *error_string;
|
||||
error_string = glGetString(GL_PROGRAM_ERROR_STRING_ARB);
|
||||
fprintf(stderr, "Program error at position: %d\n%s\n", (int)error_pos,
|
||||
error_string);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
return program_id;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
inline GLuint CompileASMShaderFromFile(GLenum target, const char *filename) {
|
||||
FILE *shaderFile;
|
||||
char *text;
|
||||
long size;
|
||||
size_t fsize = 0;
|
||||
|
||||
// read files as binary to prevent problems from newline translation
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
|
||||
|
||||
if (fopen_s(&shaderFile, filename, "rb") != 0)
|
||||
#else
|
||||
if ((shaderFile = fopen(filename, "rb")) == 0)
|
||||
#endif
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get the length of the file
|
||||
fseek(shaderFile, 0, SEEK_END);
|
||||
size = ftell(shaderFile);
|
||||
|
||||
// Read the file contents from the start, then close file and add a null
|
||||
// terminator
|
||||
fseek(shaderFile, 0, SEEK_SET);
|
||||
text = new char[size + 1];
|
||||
fsize = fread(text, size, 1, shaderFile);
|
||||
fclose(shaderFile);
|
||||
|
||||
if (fsize == 0) {
|
||||
printf("CompileGLSLShaderFromFile(), error... fsize = 0\n");
|
||||
}
|
||||
|
||||
text[size] = '\0';
|
||||
|
||||
GLuint program_id = CompileASMShader(target, text);
|
||||
|
||||
delete[] text;
|
||||
|
||||
return program_id;
|
||||
}
|
||||
|
||||
} // namespace nv
|
||||
#endif
|
1074
Common/nvVector.h
Normal file
1074
Common/nvVector.h
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -49,6 +49,11 @@
|
|||
|
||||
void compileFileToCUBIN(char *filename, int argc, char **argv, char **cubinResult,
|
||||
size_t *cubinResultSize, int requiresCGheaders) {
|
||||
if (!filename) {
|
||||
std::cerr << "\nerror: filename is empty for compileFileToCUBIN()!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
std::ifstream inputFile(filename,
|
||||
std::ios::in | std::ios::binary | std::ios::ate);
|
||||
|
||||
|
@ -111,7 +116,12 @@ void compileFileToCUBIN(char *filename, int argc, char **argv, char **cubinResul
|
|||
|
||||
compileOptions = "--include-path=";
|
||||
|
||||
std::string path = sdkFindFilePath(HeaderNames, argv[0]);
|
||||
char *strPath = sdkFindFilePath(HeaderNames, argv[0]);
|
||||
if (!strPath) {
|
||||
std::cerr << "\nerror: header file " << HeaderNames << " not found!\n";
|
||||
exit(1);
|
||||
}
|
||||
std::string path = strPath;
|
||||
if (!path.empty()) {
|
||||
std::size_t found = path.find(HeaderNames);
|
||||
path.erase(found);
|
||||
|
@ -120,6 +130,7 @@ void compileFileToCUBIN(char *filename, int argc, char **argv, char **cubinResul
|
|||
"\nCooperativeGroups headers not found, please install it in %s "
|
||||
"sample directory..\n Exiting..\n",
|
||||
argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
compileOptions += path.c_str();
|
||||
compileParams[numCompileOptions] = reinterpret_cast<char *>(
|
||||
|
|
236
Common/param.h
Normal file
236
Common/param.h
Normal file
|
@ -0,0 +1,236 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
Simple parameter system
|
||||
sgreen@nvidia.com 4/2001
|
||||
*/
|
||||
|
||||
#ifndef PARAM_H
|
||||
#define PARAM_H
|
||||
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// base class for named parameter
|
||||
class ParamBase {
|
||||
public:
|
||||
ParamBase(const char *name) : m_name(name) {}
|
||||
virtual ~ParamBase() {}
|
||||
|
||||
std::string &GetName() { return m_name; }
|
||||
|
||||
virtual float GetFloatValue() = 0;
|
||||
virtual int GetIntValue() = 0;
|
||||
virtual std::string GetValueString() = 0;
|
||||
|
||||
virtual void Reset() = 0;
|
||||
virtual void Increment() = 0;
|
||||
virtual void Decrement() = 0;
|
||||
|
||||
virtual float GetPercentage() = 0;
|
||||
virtual void SetPercentage(float p) = 0;
|
||||
|
||||
virtual void Write(std::ostream &stream) = 0;
|
||||
virtual void Read(std::istream &stream) = 0;
|
||||
|
||||
virtual bool IsList() = 0;
|
||||
|
||||
protected:
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
// derived class for single-valued parameter
|
||||
template <class T>
|
||||
class Param : public ParamBase {
|
||||
public:
|
||||
Param(const char *name, T value = 0, T min = 0, T max = 10000, T step = 1,
|
||||
T *ptr = 0)
|
||||
: ParamBase(name),
|
||||
m_default(value),
|
||||
m_min(min),
|
||||
m_max(max),
|
||||
m_step(step),
|
||||
m_precision(3) {
|
||||
if (ptr) {
|
||||
m_ptr = ptr;
|
||||
} else {
|
||||
m_ptr = &m_value;
|
||||
}
|
||||
|
||||
*m_ptr = value;
|
||||
}
|
||||
~Param() {}
|
||||
|
||||
T GetValue() const { return *m_ptr; }
|
||||
T SetValue(const T value) { *m_ptr = value; }
|
||||
|
||||
float GetFloatValue() { return (float)*m_ptr; }
|
||||
int GetIntValue() { return (int)*m_ptr; }
|
||||
|
||||
std::string GetValueString() {
|
||||
std::ostringstream ost;
|
||||
ost << std::setprecision(m_precision) << std::fixed;
|
||||
ost << *m_ptr;
|
||||
return ost.str();
|
||||
}
|
||||
|
||||
void SetPrecision(int x) { m_precision = x; }
|
||||
|
||||
float GetPercentage() { return (*m_ptr - m_min) / (float)(m_max - m_min); }
|
||||
|
||||
void SetPercentage(float p) { *m_ptr = (T)(m_min + p * (m_max - m_min)); }
|
||||
|
||||
void Reset() { *m_ptr = m_default; }
|
||||
|
||||
void Increment() {
|
||||
*m_ptr += m_step;
|
||||
|
||||
if (*m_ptr > m_max) {
|
||||
*m_ptr = m_max;
|
||||
}
|
||||
}
|
||||
|
||||
void Decrement() {
|
||||
*m_ptr -= m_step;
|
||||
|
||||
if (*m_ptr < m_min) {
|
||||
*m_ptr = m_min;
|
||||
}
|
||||
}
|
||||
|
||||
void Write(std::ostream &stream) {
|
||||
stream << m_name << " " << *m_ptr << '\n';
|
||||
}
|
||||
void Read(std::istream &stream) { stream >> m_name >> *m_ptr; }
|
||||
|
||||
bool IsList() { return false; }
|
||||
|
||||
private:
|
||||
T m_value;
|
||||
T *m_ptr; // pointer to value declared elsewhere
|
||||
T m_default, m_min, m_max, m_step;
|
||||
int m_precision; // number of digits after decimal point in string output
|
||||
};
|
||||
|
||||
const Param<int> dummy("error");
|
||||
|
||||
// list of parameters
|
||||
class ParamList : public ParamBase {
|
||||
public:
|
||||
ParamList(const char *name = "") : ParamBase(name) { active = true; }
|
||||
~ParamList() {}
|
||||
|
||||
float GetFloatValue() { return 0.0f; }
|
||||
int GetIntValue() { return 0; }
|
||||
|
||||
void AddParam(ParamBase *param) {
|
||||
m_params.push_back(param);
|
||||
m_map[param->GetName()] = param;
|
||||
m_current = m_params.begin();
|
||||
}
|
||||
|
||||
// look-up parameter based on name
|
||||
ParamBase *GetParam(char *name) {
|
||||
ParamBase *p = m_map[name];
|
||||
|
||||
if (p) {
|
||||
return p;
|
||||
} else {
|
||||
return (ParamBase *)&dummy;
|
||||
}
|
||||
}
|
||||
|
||||
ParamBase *GetParam(int i) { return m_params[i]; }
|
||||
|
||||
ParamBase *GetCurrent() { return *m_current; }
|
||||
|
||||
int GetSize() { return (int)m_params.size(); }
|
||||
|
||||
std::string GetValueString() { return m_name; }
|
||||
|
||||
// functions to traverse list
|
||||
void Reset() { m_current = m_params.begin(); }
|
||||
|
||||
void Increment() {
|
||||
m_current++;
|
||||
|
||||
if (m_current == m_params.end()) {
|
||||
m_current = m_params.begin();
|
||||
}
|
||||
}
|
||||
|
||||
void Decrement() {
|
||||
if (m_current == m_params.begin()) {
|
||||
m_current = m_params.end() - 1;
|
||||
} else {
|
||||
m_current--;
|
||||
}
|
||||
}
|
||||
|
||||
float GetPercentage() { return 0.0f; }
|
||||
void SetPercentage(float /*p*/) {}
|
||||
|
||||
void Write(std::ostream &stream) {
|
||||
stream << m_name << '\n';
|
||||
|
||||
for (std::vector<ParamBase *>::const_iterator p = m_params.begin();
|
||||
p != m_params.end(); ++p) {
|
||||
(*p)->Write(stream);
|
||||
}
|
||||
}
|
||||
|
||||
void Read(std::istream &stream) {
|
||||
stream >> m_name;
|
||||
|
||||
for (std::vector<ParamBase *>::const_iterator p = m_params.begin();
|
||||
p != m_params.end(); ++p) {
|
||||
(*p)->Read(stream);
|
||||
}
|
||||
}
|
||||
|
||||
bool IsList() { return true; }
|
||||
|
||||
void ResetAll() {
|
||||
for (std::vector<ParamBase *>::const_iterator p = m_params.begin();
|
||||
p != m_params.end(); ++p) {
|
||||
(*p)->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
bool active;
|
||||
std::vector<ParamBase *> m_params;
|
||||
std::map<std::string, ParamBase *> m_map;
|
||||
std::vector<ParamBase *>::const_iterator m_current;
|
||||
};
|
||||
|
||||
#endif
|
307
Common/paramgl.h
Normal file
307
Common/paramgl.h
Normal file
|
@ -0,0 +1,307 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
ParamListGL
|
||||
- class derived from ParamList to do simple OpenGL rendering of a parameter
|
||||
list sgg 8/2001
|
||||
*/
|
||||
|
||||
#ifndef PARAMGL_H
|
||||
#define PARAMGL_H
|
||||
|
||||
#if defined(__APPLE__) || defined(MACOSX)
|
||||
#include <GLUT/glut.h>
|
||||
#else
|
||||
#include <GL/freeglut.h>
|
||||
#endif
|
||||
|
||||
#include <param.h>
|
||||
#include <string.h>
|
||||
|
||||
inline void beginWinCoords(void) {
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0, (GLfloat)(glutGet(GLUT_WINDOW_HEIGHT) - 1.0), 0.0);
|
||||
glScalef(1.0, -1.0, 1.0);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(0, glutGet(GLUT_WINDOW_WIDTH), 0, glutGet(GLUT_WINDOW_HEIGHT), -1, 1);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
||||
inline void endWinCoords(void) {
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
inline void glPrint(int x, int y, const char *s, void *font) {
|
||||
glRasterPos2f((GLfloat)x, (GLfloat)y);
|
||||
int len = (int)strlen(s);
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
glutBitmapCharacter(font, s[i]);
|
||||
}
|
||||
}
|
||||
|
||||
inline void glPrintShadowed(int x, int y, const char *s, void *font,
|
||||
float *color) {
|
||||
glColor3f(0.0, 0.0, 0.0);
|
||||
glPrint(x - 1, y - 1, s, font);
|
||||
|
||||
glColor3fv((GLfloat *)color);
|
||||
glPrint(x, y, s, font);
|
||||
}
|
||||
|
||||
class ParamListGL : public ParamList {
|
||||
public:
|
||||
ParamListGL(const char *name = "")
|
||||
: ParamList(name),
|
||||
m_active(true),
|
||||
m_text_color_selected(1.0, 1.0, 1.0),
|
||||
m_text_color_unselected(0.75, 0.75, 0.75),
|
||||
m_text_color_shadow(0.0, 0.0, 0.0),
|
||||
m_bar_color_outer(0.25, 0.25, 0.25),
|
||||
m_bar_color_inner(1.0, 1.0, 1.0) {
|
||||
m_font = (void *)GLUT_BITMAP_9_BY_15; // GLUT_BITMAP_8_BY_13;
|
||||
m_font_h = 15;
|
||||
m_bar_x = 260;
|
||||
m_bar_w = 250;
|
||||
m_bar_h = 10;
|
||||
m_bar_offset = 5;
|
||||
m_text_x = 5;
|
||||
m_separation = 15;
|
||||
m_value_x = 200;
|
||||
m_start_x = 0;
|
||||
m_start_y = 0;
|
||||
}
|
||||
|
||||
void Render(int x, int y, bool shadow = false) {
|
||||
beginWinCoords();
|
||||
|
||||
m_start_x = x;
|
||||
m_start_y = y;
|
||||
|
||||
for (std::vector<ParamBase *>::const_iterator p = m_params.begin();
|
||||
p != m_params.end(); ++p) {
|
||||
if ((*p)->IsList()) {
|
||||
ParamListGL *list = (ParamListGL *)(*p);
|
||||
list->Render(x + 10, y);
|
||||
y += m_separation * list->GetSize();
|
||||
} else {
|
||||
if (p == m_current) {
|
||||
glColor3fv(&m_text_color_selected.r);
|
||||
} else {
|
||||
glColor3fv(&m_text_color_unselected.r);
|
||||
}
|
||||
|
||||
if (shadow) {
|
||||
glPrintShadowed(x + m_text_x, y + m_font_h, (*p)->GetName().c_str(),
|
||||
m_font,
|
||||
(p == m_current) ? &m_text_color_selected.r
|
||||
: &m_text_color_unselected.r);
|
||||
glPrintShadowed(x + m_value_x, y + m_font_h,
|
||||
(*p)->GetValueString().c_str(), m_font,
|
||||
(p == m_current) ? &m_text_color_selected.r
|
||||
: &m_text_color_unselected.r);
|
||||
} else {
|
||||
glPrint(x + m_text_x, y + m_font_h, (*p)->GetName().c_str(), m_font);
|
||||
glPrint(x + m_value_x, y + m_font_h, (*p)->GetValueString().c_str(),
|
||||
m_font);
|
||||
}
|
||||
|
||||
glColor3fv((GLfloat *)&m_bar_color_outer.r);
|
||||
glBegin(GL_LINE_LOOP);
|
||||
glVertex2f((GLfloat)(x + m_bar_x), (GLfloat)(y + m_bar_offset));
|
||||
glVertex2f((GLfloat)(x + m_bar_x + m_bar_w),
|
||||
(GLfloat)(y + m_bar_offset));
|
||||
glVertex2f((GLfloat)(x + m_bar_x + m_bar_w),
|
||||
(GLfloat)(y + m_bar_offset + m_bar_h));
|
||||
glVertex2f((GLfloat)(x + m_bar_x),
|
||||
(GLfloat)(y + m_bar_offset + m_bar_h));
|
||||
glEnd();
|
||||
|
||||
glColor3fv((GLfloat *)&m_bar_color_inner.r);
|
||||
glRectf(
|
||||
(GLfloat)(x + m_bar_x), (GLfloat)(y + m_bar_offset + m_bar_h),
|
||||
(GLfloat)(x + m_bar_x + ((m_bar_w - 1) * (*p)->GetPercentage())),
|
||||
(GLfloat)(y + m_bar_offset + 1));
|
||||
|
||||
y += m_separation;
|
||||
}
|
||||
}
|
||||
|
||||
endWinCoords();
|
||||
}
|
||||
|
||||
bool Mouse(int x, int y, int button = GLUT_LEFT_BUTTON,
|
||||
int state = GLUT_DOWN) {
|
||||
if ((y < m_start_y) ||
|
||||
(y > (int)(m_start_y + (m_separation * m_params.size()) - 1))) {
|
||||
m_active = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_active = true;
|
||||
|
||||
int i = (y - m_start_y) / m_separation;
|
||||
|
||||
if ((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN)) {
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
m_current = &m_params[i];
|
||||
#else
|
||||
|
||||
// MJH: workaround since the version of vector::at used here is
|
||||
// non-standard
|
||||
for (m_current = m_params.begin(); m_current != m_params.end() && i > 0;
|
||||
m_current++, i--)
|
||||
;
|
||||
|
||||
// m_current = (std::vector<ParamBase
|
||||
// *>::const_iterator)&m_params.at(i);
|
||||
#endif
|
||||
|
||||
if ((x > m_bar_x) && (x < m_bar_x + m_bar_w)) {
|
||||
Motion(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Motion(int x, int y) {
|
||||
if ((y < m_start_y) ||
|
||||
(y > m_start_y + (m_separation * (int)m_params.size()) - 1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (x < m_bar_x) {
|
||||
(*m_current)->SetPercentage(0.0);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (x > m_bar_x + m_bar_w) {
|
||||
(*m_current)->SetPercentage(1.0);
|
||||
return true;
|
||||
}
|
||||
|
||||
(*m_current)->SetPercentage((x - m_bar_x) / (float)m_bar_w);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Special(int key, int x, int y) {
|
||||
if (!m_active) return;
|
||||
|
||||
switch (key) {
|
||||
case GLUT_KEY_DOWN:
|
||||
Increment();
|
||||
break;
|
||||
|
||||
case GLUT_KEY_UP:
|
||||
Decrement();
|
||||
break;
|
||||
|
||||
case GLUT_KEY_RIGHT:
|
||||
GetCurrent()->Increment();
|
||||
break;
|
||||
|
||||
case GLUT_KEY_LEFT:
|
||||
GetCurrent()->Decrement();
|
||||
break;
|
||||
|
||||
case GLUT_KEY_HOME:
|
||||
GetCurrent()->Reset();
|
||||
break;
|
||||
|
||||
case GLUT_KEY_END:
|
||||
GetCurrent()->SetPercentage(1.0);
|
||||
break;
|
||||
}
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
void SetFont(void *font, int height) {
|
||||
m_font = font;
|
||||
m_font_h = height;
|
||||
}
|
||||
|
||||
void SetSelectedColor(float r, float g, float b) {
|
||||
m_text_color_selected = Color(r, g, b);
|
||||
}
|
||||
void SetUnSelectedColor(float r, float g, float b) {
|
||||
m_text_color_unselected = Color(r, g, b);
|
||||
}
|
||||
void SetBarColorInner(float r, float g, float b) {
|
||||
m_bar_color_inner = Color(r, g, b);
|
||||
}
|
||||
void SetBarColorOuter(float r, float g, float b) {
|
||||
m_bar_color_outer = Color(r, g, b);
|
||||
}
|
||||
|
||||
void SetActive(bool b) { m_active = b; }
|
||||
|
||||
private:
|
||||
void *m_font;
|
||||
int m_font_h; // font height
|
||||
|
||||
int m_bar_x; // bar start x position
|
||||
int m_bar_w; // bar width
|
||||
int m_bar_h; // bar height
|
||||
int m_text_x; // text start x position
|
||||
int m_separation; // bar separation in y
|
||||
int m_value_x; // value text x position
|
||||
int m_bar_offset; // bar offset in y
|
||||
|
||||
int m_start_x, m_start_y;
|
||||
|
||||
bool m_active;
|
||||
|
||||
struct Color {
|
||||
Color(float _r, float _g, float _b) {
|
||||
r = _r;
|
||||
g = _g;
|
||||
b = _b;
|
||||
}
|
||||
float r, g, b;
|
||||
};
|
||||
|
||||
Color m_text_color_selected;
|
||||
Color m_text_color_unselected;
|
||||
Color m_text_color_shadow;
|
||||
Color m_bar_color_outer;
|
||||
Color m_bar_color_inner;
|
||||
};
|
||||
|
||||
#endif
|
128
Common/rendercheck_d3d10.cpp
Normal file
128
Common/rendercheck_d3d10.cpp
Normal file
|
@ -0,0 +1,128 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Utility funcs to wrap up saving a surface or the back buffer as a PPM file
|
||||
// In addition, wraps up a threshold comparision of two PPMs.
|
||||
//
|
||||
// These functions are designed to be used to implement an automated QA testing
|
||||
// for SDK samples.
|
||||
//
|
||||
// Author: Bryan Dudash
|
||||
// Email: sdkfeedback@nvidia.com
|
||||
//
|
||||
// Copyright (c) NVIDIA Corporation. All rights reserved.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <helper_functions.h>
|
||||
#include <rendercheck_d3d10.h>
|
||||
|
||||
HRESULT CheckRenderD3D10::ActiveRenderTargetToPPM(ID3D10Device *pDevice,
|
||||
const char *zFileName) {
|
||||
ID3D10RenderTargetView *pRTV = NULL;
|
||||
pDevice->OMGetRenderTargets(1, &pRTV, NULL);
|
||||
|
||||
ID3D10Resource *pSourceResource = NULL;
|
||||
pRTV->GetResource(&pSourceResource);
|
||||
|
||||
return ResourceToPPM(pDevice, pSourceResource, zFileName);
|
||||
}
|
||||
|
||||
HRESULT CheckRenderD3D10::ResourceToPPM(ID3D10Device *pDevice,
|
||||
ID3D10Resource *pResource,
|
||||
const char *zFileName) {
|
||||
D3D10_RESOURCE_DIMENSION rType;
|
||||
pResource->GetType(&rType);
|
||||
|
||||
if (rType != D3D10_RESOURCE_DIMENSION_TEXTURE2D) {
|
||||
printf("SurfaceToPPM: pResource is not a 2D texture! Aborting...\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3D10Texture2D *pSourceTexture = (ID3D10Texture2D *)pResource;
|
||||
ID3D10Texture2D *pTargetTexture = NULL;
|
||||
|
||||
D3D10_TEXTURE2D_DESC desc;
|
||||
pSourceTexture->GetDesc(&desc);
|
||||
desc.BindFlags = 0;
|
||||
desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ;
|
||||
desc.Usage = D3D10_USAGE_STAGING;
|
||||
|
||||
if (FAILED(pDevice->CreateTexture2D(&desc, NULL, &pTargetTexture))) {
|
||||
printf(
|
||||
"SurfaceToPPM: Unable to create target Texture resoruce! Aborting... "
|
||||
"\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
pDevice->CopyResource(pTargetTexture, pSourceTexture);
|
||||
|
||||
D3D10_MAPPED_TEXTURE2D mappedTex2D;
|
||||
pTargetTexture->Map(0, D3D10_MAP_READ, 0, &mappedTex2D);
|
||||
|
||||
// Need to convert from dx pitch to pitch=width
|
||||
unsigned char *pPPMData = new unsigned char[desc.Width * desc.Height * 4];
|
||||
|
||||
for (unsigned int iHeight = 0; iHeight < desc.Height; iHeight++) {
|
||||
memcpy(
|
||||
&(pPPMData[iHeight * desc.Width * 4]),
|
||||
(unsigned char *)(mappedTex2D.pData) + iHeight * mappedTex2D.RowPitch,
|
||||
desc.Width * 4);
|
||||
}
|
||||
|
||||
pTargetTexture->Unmap(0);
|
||||
|
||||
// Prepends the PPM header info and bumps byte data afterwards
|
||||
sdkSavePPM4ub(zFileName, pPPMData, desc.Width, desc.Height);
|
||||
|
||||
delete[] pPPMData;
|
||||
pTargetTexture->Release();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
bool CheckRenderD3D10::PPMvsPPM(const char *src_file, const char *ref_file,
|
||||
const char *exec_path, const float epsilon,
|
||||
const float threshold) {
|
||||
char *ref_file_path = sdkFindFilePath(ref_file, exec_path);
|
||||
|
||||
if (ref_file_path == NULL) {
|
||||
printf(
|
||||
"CheckRenderD3D10::PPMvsPPM unable to find <%s> in <%s> Aborting "
|
||||
"comparison!\n",
|
||||
ref_file, exec_path);
|
||||
printf(">>> Check info.xml and [project//data] folder <%s> <<<\n",
|
||||
ref_file);
|
||||
printf("Aborting comparison!\n");
|
||||
printf(" FAILURE!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
return (sdkComparePPM(src_file, ref_file_path, epsilon, threshold, true) ==
|
||||
true);
|
||||
}
|
53
Common/rendercheck_d3d10.h
Normal file
53
Common/rendercheck_d3d10.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _RENDERCHECK_D3D10_H_
|
||||
#define _RENDERCHECK_D3D10_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <d3d10.h>
|
||||
|
||||
class CheckRenderD3D10 {
|
||||
public:
|
||||
CheckRenderD3D10() {}
|
||||
|
||||
static HRESULT ActiveRenderTargetToPPM(ID3D10Device *pDevice,
|
||||
const char *zFileName);
|
||||
static HRESULT ResourceToPPM(ID3D10Device *pDevice, ID3D10Resource *pResource,
|
||||
const char *zFileName);
|
||||
|
||||
static bool PPMvsPPM(const char *src_file, const char *ref_file,
|
||||
const char *exec_path, const float epsilon,
|
||||
const float threshold = 0.0f);
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
167
Common/rendercheck_d3d9.cpp
Normal file
167
Common/rendercheck_d3d9.cpp
Normal file
|
@ -0,0 +1,167 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Utility funcs to wrap up savings a surface or the back buffer as a PPM file
|
||||
// In addition, wraps up a threshold comparision of two PPMs.
|
||||
//
|
||||
// These functions are designed to be used to implement an automated QA testing
|
||||
// for SDK samples.
|
||||
//
|
||||
// Author: Bryan Dudash
|
||||
// Email: sdkfeedback@nvidia.com
|
||||
//
|
||||
// Copyright (c) NVIDIA Corporation. All rights reserved.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <helper_functions.h>
|
||||
#include <rendercheck_d3d9.h>
|
||||
|
||||
// originally copied from checkrender_gl.cpp and slightly modified
|
||||
bool CheckRenderD3D9::PPMvsPPM(const char *src_file, const char *ref_file,
|
||||
const char *exec_path, const float epsilon,
|
||||
const float threshold) {
|
||||
char *ref_file_path = sdkFindFilePath(ref_file, exec_path);
|
||||
|
||||
if (ref_file_path == NULL) {
|
||||
printf(
|
||||
"CheckRenderD3D9::PPMvsPPM unable to find <%s> in <%s> Aborting "
|
||||
"comparison!\n",
|
||||
ref_file, exec_path);
|
||||
printf(">>> Check info.xml and [project//data] folder <%s> <<<\n",
|
||||
ref_file);
|
||||
printf("Aborting comparison!\n");
|
||||
printf(" FAILURE!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
return (sdkComparePPM(src_file, ref_file_path, epsilon, threshold, true) ==
|
||||
true);
|
||||
};
|
||||
|
||||
HRESULT CheckRenderD3D9::BackbufferToPPM(IDirect3DDevice9 *pDevice,
|
||||
const char *zFileName) {
|
||||
IDirect3DSurface9 *pSurface = NULL;
|
||||
|
||||
if (FAILED(
|
||||
pDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pSurface))) {
|
||||
printf("Unable to get the back buffer. Aborting...\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// D3DXSaveSurfaceToFile("C:\\bing.dds",D3DXIFF_DDS,pSurface,NULL,NULL);
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
hr = SurfaceToPPM(pDevice, pSurface, zFileName);
|
||||
|
||||
pSurface->Release();
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT CheckRenderD3D9::SurfaceToPPM(IDirect3DDevice9 *pDevice,
|
||||
IDirect3DSurface9 *pSurface,
|
||||
const char *zFileName) {
|
||||
D3DSURFACE_DESC pDesc;
|
||||
pSurface->GetDesc(&pDesc);
|
||||
|
||||
// $$ For now only support common 8bit formats. TODO: support for more
|
||||
// complex formats via conversion?
|
||||
if (!(pDesc.Format == D3DFMT_A8R8G8B8 || pDesc.Format == D3DFMT_X8R8G8B8)) {
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
IDirect3DTexture9 *pTargetTex = NULL;
|
||||
|
||||
if (FAILED(pDevice->CreateTexture(pDesc.Width, pDesc.Height, 1,
|
||||
D3DUSAGE_DYNAMIC, pDesc.Format,
|
||||
D3DPOOL_SYSTEMMEM, &pTargetTex, NULL))) {
|
||||
printf("Unable to create texture for surface transfer! Aborting...\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
IDirect3DSurface9 *pTargetSurface = NULL;
|
||||
|
||||
if (FAILED(pTargetTex->GetSurfaceLevel(0, &pTargetSurface))) {
|
||||
printf("Unable to get surface for surface transfer! Aborting...\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// This is required because we cannot lock a D3DPOOL_DEAULT surface directly.
|
||||
// So, we copy to our sysmem surface.
|
||||
if (FAILED(pDevice->GetRenderTargetData(pSurface, pTargetSurface))) {
|
||||
printf(
|
||||
"Unable to GetRenderTargetData() for surface transfer! Aborting...\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
D3DLOCKED_RECT lockedRect;
|
||||
HRESULT hr = pTargetSurface->LockRect(&lockedRect, NULL, 0);
|
||||
|
||||
// Need to convert from dx pitch to pitch=width
|
||||
//
|
||||
// $ PPM is BGR and not RGB it seems. Saved image looks "funny" in viewer(red
|
||||
// and blue swapped), but since ref will be dumped using same method, this is
|
||||
// ok.
|
||||
// however, if we want the saved image to be properly colored, then we
|
||||
// can swizzle the color bytes here.
|
||||
unsigned char *pPPMData = new unsigned char[pDesc.Width * pDesc.Height * 4];
|
||||
|
||||
for (unsigned int iHeight = 0; iHeight < pDesc.Height; iHeight++) {
|
||||
#if 1 // swizzle to implment RGB to BGR conversion.
|
||||
|
||||
for (unsigned int iWidth = 0; iWidth < pDesc.Width; iWidth++) {
|
||||
DWORD color = *(DWORD *)((unsigned char *)(lockedRect.pBits) +
|
||||
iHeight * lockedRect.Pitch + iWidth * 4);
|
||||
|
||||
// R<->B, [7:0] <-> [23:16], swizzle
|
||||
color = ((color & 0xFF) << 16) | (color & 0xFF00) |
|
||||
((color & 0xFF0000) >> 16) | (color & 0xFF000000);
|
||||
|
||||
memcpy(&(pPPMData[(iHeight * pDesc.Width + iWidth) * 4]),
|
||||
(unsigned char *)&color, 4);
|
||||
}
|
||||
|
||||
#else
|
||||
memcpy(&(pPPMData[iHeight * pDesc.Width * 4]),
|
||||
(unsigned char *)(lockedRect.pBits) + iHeight * lockedRect.Pitch,
|
||||
pDesc.Width * 4);
|
||||
#endif
|
||||
}
|
||||
|
||||
pTargetSurface->UnlockRect();
|
||||
|
||||
// Prepends the PPM header info and bumps byte data afterwards
|
||||
sdkSavePPM4ub(zFileName, pPPMData, pDesc.Width, pDesc.Height);
|
||||
|
||||
delete[] pPPMData;
|
||||
pTargetSurface->Release();
|
||||
pTargetTex->Release();
|
||||
|
||||
return S_OK;
|
||||
}
|
54
Common/rendercheck_d3d9.h
Normal file
54
Common/rendercheck_d3d9.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _RENDERCHECK_D3D9_H_
|
||||
#define _RENDERCHECK_D3D9_H_
|
||||
|
||||
#include <assert.h>
|
||||
#include <d3d9.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
class CheckRenderD3D9 {
|
||||
public:
|
||||
CheckRenderD3D9() {}
|
||||
|
||||
static HRESULT BackbufferToPPM(IDirect3DDevice9 *pDevice,
|
||||
const char *zFileName);
|
||||
static HRESULT SurfaceToPPM(IDirect3DDevice9 *pDevice,
|
||||
IDirect3DSurface9 *pSurface,
|
||||
const char *zFileName);
|
||||
|
||||
static bool PPMvsPPM(const char *src_file, const char *ref_file,
|
||||
const char *exec_path, const float epsilon,
|
||||
const float threshold = 0.0f);
|
||||
};
|
||||
|
||||
#endif
|
1347
Common/rendercheck_gl.h
Normal file
1347
Common/rendercheck_gl.h
Normal file
File diff suppressed because it is too large
Load Diff
1312
Common/rendercheck_gles.h
Normal file
1312
Common/rendercheck_gles.h
Normal file
File diff suppressed because it is too large
Load Diff
21
CppProperties.json
Normal file
21
CppProperties.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"inheritEnvironments": [
|
||||
"msvc_x64"
|
||||
],
|
||||
"name": "x64-Debug",
|
||||
"includePath": [
|
||||
"${env.INCLUDE}",
|
||||
"${workspaceRoot}\\**"
|
||||
],
|
||||
"defines": [
|
||||
"WIN32",
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "windows-msvc-x64"
|
||||
}
|
||||
]
|
||||
}
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
|
7
Makefile
7
Makefile
|
@ -1,6 +1,6 @@
|
|||
###############################################################################
|
||||
#
|
||||
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
@ -44,6 +44,9 @@ PROJECTS := $(filter-out $(FILTER_OUT),$(PROJECTS))
|
|||
%.ph_build :
|
||||
+@$(MAKE) -C $(dir $*) $(MAKECMDGOALS)
|
||||
|
||||
%.ph_test :
|
||||
+@$(MAKE) -C $(dir $*) testrun
|
||||
|
||||
%.ph_clean :
|
||||
+@$(MAKE) -C $(dir $*) clean $(USE_DEVICE)
|
||||
|
||||
|
@ -55,6 +58,8 @@ all: $(addsuffix .ph_build,$(PROJECTS))
|
|||
|
||||
build: $(addsuffix .ph_build,$(PROJECTS))
|
||||
|
||||
test : $(addsuffix .ph_test,$(PROJECTS))
|
||||
|
||||
tidy:
|
||||
@find * | egrep "#" | xargs rm -f
|
||||
@find * | egrep "\~" | xargs rm -f
|
||||
|
|
158
README.md
158
README.md
|
@ -1,109 +1,23 @@
|
|||
# CUDA Samples
|
||||
|
||||
Samples for CUDA Developers which demonstrates features in CUDA Toolkit. This version supports [CUDA Toolkit 11.2](https://developer.nvidia.com/cuda-downloads).
|
||||
Samples for CUDA Developers which demonstrates features in CUDA Toolkit. This version supports [CUDA Toolkit 11.6](https://developer.nvidia.com/cuda-downloads).
|
||||
|
||||
## Release Notes
|
||||
|
||||
This section describes the release notes for the CUDA Samples on GitHub only.
|
||||
|
||||
### CUDA 11.2
|
||||
* Added `streamOrderedAllocation`. Demonstrates stream ordered memory allocation on a GPU using cudaMallocAsync and cudaMemPool family of APIs.
|
||||
* Added `streamOrderedAllocationP2P`. Demonstrates peer-to-peer access of stream ordered memory allocated using cudaMallocAsync and cudaMemPool family of APIs.
|
||||
* Dropped Visual Studio 2015 support from all the windows supported samples.
|
||||
* FreeImage is no longer distributed with the CUDA Samples. On Windows, see the [Dependencies](#freeimage) section for more details on how to set up FreeImage. On Linux, it is recommended to install FreeImage with your distribution's package manager.
|
||||
* All the samples using CUDA Pipeline & Arrive-wait barriers are been updated to use new `cuda::pipeline` and `cuda::barrier` interfaces.
|
||||
* Updated all the samples to build with parallel build option `--threads` of `nvcc` cuda compiler.
|
||||
* Added `cudaNvSciNvMedia`. Demonstrates CUDA-NvMedia interop via NvSciBuf/NvSciSync APIs.
|
||||
* Added `simpleGL`. Demonstrates interoperability between CUDA and OpenGL.
|
||||
### CUDA 11.6
|
||||
* Added new folder structure for samples
|
||||
* Added support of Visual Studio 2022 to all samples supported on [Windows](#windows-1).
|
||||
* All CUDA samples are now only available on [GitHub](https://github.com/nvidia/cuda-samples). They are no longer available via CUDA toolkit.
|
||||
|
||||
### CUDA 11.1
|
||||
* Added `watershedSegmentationNPP`. Demonstrates how to use the NPP watershed segmentation function.
|
||||
* Added `batchedLabelMarkersAndLabelCompressionNPP`. Demonstrates how to use the NPP label markers generation and label compression functions based on a Union Find (UF) algorithm including both single image and batched image versions.
|
||||
* Dropped Visual Studio 2012, 2013 support from all the windows supported samples.
|
||||
* Added kernel performing warp aggregated atomic max in multi buckets using cg::labeled_partition & cg::reduce in `warpAggregatedAtomicsCG`.
|
||||
* Added extended CG shuffle mechanics to `shfl_scan` sample.
|
||||
* Added `cudaOpenMP`. Demonstrates how to use OpenMP API to write an application for multiple GPUs.
|
||||
* Added `simpleZeroCopy`. Demonstrates how to use zero copy, kernels can read and write directly to pinned system memory.
|
||||
|
||||
### CUDA 11.0
|
||||
* Added `dmmaTensorCoreGemm`. Demonstrates double precision GEMM computation using the Double precision Warp Matrix Multiply and Accumulate (WMMA) API introduced with CUDA 11 in Ampere chip family tensor cores.
|
||||
* Added `bf16TensorCoreGemm`. Demonstrates __nv_bfloat16 (e8m7) GEMM computation using the __nv_bfloat16 WMMA API introduced with CUDA 11 in Ampere chip family tensor cores.
|
||||
* Added `tf32TensorCoreGemm`. Demonstrates tf32 (e8m10) GEMM computation using the tf32 WMMA API introduced with CUDA 11 in Ampere chip family tensor cores.
|
||||
* Added `globalToShmemAsyncCopy`. Demonstrates async copy of data from global to shared memory when on compute capability 8.0 or higher. Also demonstrates arrive-wait barrier for synchronization.
|
||||
* Added `simpleAWBarrier`. Demonstrates arrive wait barriers.
|
||||
* Added `simpleAttributes`. Demonstrates the stream attributes that affect L2 locality.
|
||||
* Added warp aggregated atomic multi bucket increments kernel using labeled_partition cooperative groups in `warpAggregatedAtomicsCG` which can be used on compute capability 7.0 and above GPU architectures.
|
||||
* Added `binaryPartitionCG`. Demonstrates binary partition cooperative groups and reduction within the thread block.
|
||||
* Added two new reduction kernels in `reduction` one which demonstrates reduce_add_sync intrinstic supported on compute capability 8.0 and another which uses cooperative_groups::reduce function which does thread_block_tile level reduction introduced from CUDA 11.0.
|
||||
* Added `cudaCompressibleMemory`. Demonstrates compressible memory allocation using cuMemMap API.
|
||||
* Added `simpleVulkanMMAP`. Demonstrates Vulkan CUDA Interop via cuMemMap APIs.
|
||||
* Added `concurrentKernels`. Demonstrates the use of CUDA streams for concurrent execution of several kernels on a GPU.
|
||||
* Dropped Mac OSX support from all samples.
|
||||
|
||||
### CUDA 10.2
|
||||
* Added `simpleD3D11`. Demonstrates CUDA-D3D11 External Resource Interoperability APIs for updating D3D11 buffers from CUDA and synchronization between D3D11 and CUDA with Keyed Mutexes.
|
||||
* Added `simpleDrvRuntime`. Demonstrates CUDA Driver and Runtime APIs working together to load fatbinary of a CUDA kernel.
|
||||
* Added `vectorAddMMAP`. Demonstrates how cuMemMap API allows the user to specify the physical properties of their memory while retaining the contiguous nature of their access.
|
||||
* Added `memMapIPCDrv`. Demonstrates Inter Process Communication using cuMemMap APIs.
|
||||
* Added `cudaNvSci`. Demonstrates CUDA-NvSciBuf/NvSciSync Interop.
|
||||
* Added `jacobiCudaGraphs`. Demonstrates Instantiated CUDA Graph Update with Jacobi Iterative Method using different approaches.
|
||||
* Added `cuSolverSp_LinearSolver`. Demonstrates cuSolverSP's LU, QR and Cholesky factorization.
|
||||
* Added `MersenneTwisterGP11213`. Demonstrates the Mersenne Twister random number generator GP11213 in cuRAND.
|
||||
|
||||
### CUDA 10.1 Update 2
|
||||
* Added `vulkanImageCUDA`. Demonstrates how to perform Vulkan image - CUDA Interop.
|
||||
* Added `nvJPEG_encoder`. Demonstrates encoding of jpeg images using NVJPEG Library.
|
||||
* Added Windows OS support to `nvJPEG` sample.
|
||||
* Added `boxFilterNPP`. Demonstrates how to use NPP FilterBox function to perform a box filter.
|
||||
* Added `cannyEdgeDetectorNPP`. Demonstrates the nppiFilterCannyBorder_8u_C1R Canny Edge Detection image filter function.
|
||||
|
||||
### CUDA 10.1 Update 1
|
||||
* Added `NV12toBGRandResize`. Demonstrates how to convert and resize NV12 frames to BGR planars frames using CUDA in batch.
|
||||
* Added `EGLStream_CUDA_Interop`. Demonstrates data exchange between CUDA and EGL Streams.
|
||||
* Added `cuSolverDn_LinearSolver`. Demonstrates cuSolverDN's LU, QR and Cholesky factorization.
|
||||
* Added support of Visual Studio 2019 to all samples supported on [Windows](#windows-1).
|
||||
|
||||
### CUDA 10.1
|
||||
* Added `immaTensorCoreGemm`. Demonstrates integer GEMM computation using the Warp Matrix Multiply and Accumulate (WMMA) API for integers employing the Tensor Cores.
|
||||
* Added `simpleIPC`. Demonstrates Inter Process Communication with one process per GPU for computation.
|
||||
* Added `nvJPEG`. Demonstrates single and batched decoding of jpeg images using NVJPEG Library.
|
||||
* Added `bandwidthTest`. It measures the memcopy bandwidth of the GPU and memcpy bandwidth across PCI-e.
|
||||
* Added `reduction`. Demonstrates several important optimization strategies for Data-Parallel Algorithms like reduction.
|
||||
* Update all the samples to support CUDA 10.1.
|
||||
|
||||
### CUDA 10.0
|
||||
* Added `simpleCudaGraphs`. Demonstrates CUDA Graphs creation, instantiation and launch using Graphs APIs and Stream Capture APIs.
|
||||
* Added `conjugateGradientCudaGraphs`. Demonstrates conjugate gradient solver on GPU using CUBLAS and CUSPARSE library calls captured and called using CUDA Graph APIs.
|
||||
* Added `simpleVulkan`. Demonstrates Vulkan - CUDA Interop.
|
||||
* Added `simpleD3D12`. Demonstrates DX12 - CUDA Interop.
|
||||
* Added `UnifiedMemoryPerf`. Demonstrates performance comparision of various memory types involved in system.
|
||||
* Added `p2pBandwidthLatencyTest`. Demonstrates Peer-To-Peer (P2P) data transfers between pairs of GPUs and computes latency and bandwidth.
|
||||
* Added `systemWideAtomics`. Demonstrates system wide atomic instructions.
|
||||
* Added `simpleCUBLASXT`. Demonstrates CUBLAS-XT library which performs GEMM operations over multiple GPUs.
|
||||
* Added Windows OS support to `conjugateGradientMultiDeviceCG` sample.
|
||||
* Removed support of Visual Studio 2010 from all samples.
|
||||
|
||||
### CUDA 9.2
|
||||
|
||||
This is the first release of CUDA Samples on GitHub:
|
||||
* Added `vectorAdd_nvrtc`. Demonstrates runtime compilation library using NVRTC of a simple vectorAdd kernel.
|
||||
* Added `warpAggregatedAtomicsCG`. Demonstrates warp aggregated atomics using Cooperative Groups.
|
||||
* Added `deviceQuery`. Enumerates the properties of the CUDA devices present in the system.
|
||||
* Added `matrixMul`. Demonstrates a matrix multiplication using shared memory through tiled approach.
|
||||
* Added `matrixMulDrv`. Demonstrates a matrix multiplication using shared memory through tiled approach, uses CUDA Driver API.
|
||||
* Added `cudaTensorCoreGemm`. Demonstrates a GEMM computation using the Warp Matrix Multiply and Accumulate (WMMA) API introduced in CUDA 9, as well as the new Tensor Cores introduced in the Volta chip family.
|
||||
* Added `simpleVoteIntrinsics` which uses *_sync equivalent of the vote intrinsics _any, _all added since CUDA 9.0.
|
||||
* Added `shfl_scan` which uses *_sync equivalent of the shfl intrinsics added since CUDA 9.0.
|
||||
* Added `conjugateGradientMultiBlockCG`. Demonstrates a conjugate gradient solver on GPU using Multi Block Cooperative Groups.
|
||||
* Added `conjugateGradientMultiDeviceCG`. Demonstrates a conjugate gradient solver on multiple GPUs using Multi Device Cooperative Groups, also uses unified memory prefetching and usage hints APIs.
|
||||
* Added `simpleCUBLAS`. Demonstrates how perform GEMM operations using CUBLAS library.
|
||||
* Added `simpleCUFFT`. Demonstrates how perform FFT operations using CUFFT library.
|
||||
### [older versions...](./CHANGELOG.md)
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Download and install the [CUDA Toolkit 11.2](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
|
||||
Download and install the [CUDA Toolkit 11.6](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
|
||||
For system requirements and installation instructions of cuda toolkit, please refer to the [Linux Installation Guide](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/), and the [Windows Installation Guide](http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html).
|
||||
|
||||
### Getting the CUDA Samples
|
||||
|
@ -157,41 +71,26 @@ The samples makefiles can take advantage of certain options:
|
|||
|
||||
## Samples list
|
||||
|
||||
### Samples by OS
|
||||
### [0. Introduction](./Samples/0_Introduction/README.md)
|
||||
Basic CUDA samples for beginners that illustrate key concepts with using CUDA and CUDA runtime APIs.
|
||||
|
||||
#### Linux
|
||||
**[warpAggregatedAtomicsCG](./Samples/warpAggregatedAtomicsCG)** | **[boxFilterNPP](./Samples/boxFilterNPP)** | **[streamOrderedAllocationP2P](./Samples/streamOrderedAllocationP2P)** | **[binaryPartitionCG](./Samples/binaryPartitionCG)** |
|
||||
---|---|---|---|
|
||||
**[dmmaTensorCoreGemm](./Samples/dmmaTensorCoreGemm)** | **[EGLStream_CUDA_Interop](./Samples/EGLStream_CUDA_Interop)** | **[conjugateGradientMultiBlockCG](./Samples/conjugateGradientMultiBlockCG)** | **[simpleIPC](./Samples/simpleIPC)** |
|
||||
**[memMapIPCDrv](./Samples/memMapIPCDrv)** | **[vectorAddMMAP](./Samples/vectorAddMMAP)** | **[shfl_scan](./Samples/shfl_scan)** | **[simpleZeroCopy](./Samples/simpleZeroCopy)** |
|
||||
**[conjugateGradientCudaGraphs](./Samples/conjugateGradientCudaGraphs)** | **[globalToShmemAsyncCopy](./Samples/globalToShmemAsyncCopy)** | **[cudaNvSciNvMedia](./Samples/cudaNvSciNvMedia)** | **[nvJPEG](./Samples/nvJPEG)** |
|
||||
**[batchedLabelMarkersAndLabelCompressionNPP](./Samples/batchedLabelMarkersAndLabelCompressionNPP)** | **[watershedSegmentationNPP](./Samples/watershedSegmentationNPP)** | **[simpleCudaGraphs](./Samples/simpleCudaGraphs)** | **[streamOrderedAllocation](./Samples/streamOrderedAllocation)** |
|
||||
**[deviceQuery](./Samples/deviceQuery)** | **[simpleVoteIntrinsics](./Samples/simpleVoteIntrinsics)** | **[simpleCUBLASXT](./Samples/simpleCUBLASXT)** | **[simpleAttributes](./Samples/simpleAttributes)** |
|
||||
**[cudaNvSci](./Samples/cudaNvSci)** | **[tf32TensorCoreGemm](./Samples/tf32TensorCoreGemm)** | **[UnifiedMemoryPerf](./Samples/UnifiedMemoryPerf)** | **[cudaCompressibleMemory](./Samples/cudaCompressibleMemory)** |
|
||||
**[bf16TensorCoreGemm](./Samples/bf16TensorCoreGemm)** | **[cuSolverDn_LinearSolver](./Samples/cuSolverDn_LinearSolver)** | **[vulkanImageCUDA](./Samples/vulkanImageCUDA)** | **[conjugateGradientMultiDeviceCG](./Samples/conjugateGradientMultiDeviceCG)** |
|
||||
**[matrixMulDrv](./Samples/matrixMulDrv)** | **[cuSolverSp_LinearSolver](./Samples/cuSolverSp_LinearSolver)** | **[simpleCUFFT](./Samples/simpleCUFFT)** | **[reduction](./Samples/reduction)** |
|
||||
**[nvJPEG_encoder](./Samples/nvJPEG_encoder)** | **[simpleDrvRuntime](./Samples/simpleDrvRuntime)** | **[MersenneTwisterGP11213](./Samples/MersenneTwisterGP11213)** | **[simpleAWBarrier](./Samples/simpleAWBarrier)** |
|
||||
**[immaTensorCoreGemm](./Samples/immaTensorCoreGemm)** | **[bandwidthTest](./Samples/bandwidthTest)** | **[concurrentKernels](./Samples/concurrentKernels)** | **[simpleCUBLAS](./Samples/simpleCUBLAS)** |
|
||||
**[NV12toBGRandResize](./Samples/NV12toBGRandResize)** | **[simpleGL](./Samples/simpleGL)** | **[cudaTensorCoreGemm](./Samples/cudaTensorCoreGemm)** | **[jacobiCudaGraphs](./Samples/jacobiCudaGraphs)** |
|
||||
**[simpleVulkan](./Samples/simpleVulkan)** | **[vectorAdd_nvrtc](./Samples/vectorAdd_nvrtc)** | **[cannyEdgeDetectorNPP](./Samples/cannyEdgeDetectorNPP)** | **[p2pBandwidthLatencyTest](./Samples/p2pBandwidthLatencyTest)** |
|
||||
**[simpleVulkanMMAP](./Samples/simpleVulkanMMAP)** | **[cudaOpenMP](./Samples/cudaOpenMP)** | **[matrixMul](./Samples/matrixMul)** | **[systemWideAtomics](./Samples/systemWideAtomics)** |
|
||||
### [1. Utilities](./Samples/1_Utilities/README.md)
|
||||
Utility samples that demonstrate how to query device capabilities and measure GPU/CPU bandwidth.
|
||||
|
||||
#### Windows
|
||||
**[warpAggregatedAtomicsCG](./Samples/warpAggregatedAtomicsCG)** | **[boxFilterNPP](./Samples/boxFilterNPP)** | **[streamOrderedAllocationP2P](./Samples/streamOrderedAllocationP2P)** | **[binaryPartitionCG](./Samples/binaryPartitionCG)** |
|
||||
---|---|---|---|
|
||||
**[dmmaTensorCoreGemm](./Samples/dmmaTensorCoreGemm)** | **[conjugateGradientMultiBlockCG](./Samples/conjugateGradientMultiBlockCG)** | **[simpleIPC](./Samples/simpleIPC)** | **[memMapIPCDrv](./Samples/memMapIPCDrv)** |
|
||||
**[vectorAddMMAP](./Samples/vectorAddMMAP)** | **[shfl_scan](./Samples/shfl_scan)** | **[simpleZeroCopy](./Samples/simpleZeroCopy)** | **[conjugateGradientCudaGraphs](./Samples/conjugateGradientCudaGraphs)** |
|
||||
**[globalToShmemAsyncCopy](./Samples/globalToShmemAsyncCopy)** | **[nvJPEG](./Samples/nvJPEG)** | **[batchedLabelMarkersAndLabelCompressionNPP](./Samples/batchedLabelMarkersAndLabelCompressionNPP)** | **[simpleD3D12](./Samples/simpleD3D12)** |
|
||||
**[watershedSegmentationNPP](./Samples/watershedSegmentationNPP)** | **[simpleCudaGraphs](./Samples/simpleCudaGraphs)** | **[streamOrderedAllocation](./Samples/streamOrderedAllocation)** | **[deviceQuery](./Samples/deviceQuery)** |
|
||||
**[simpleVoteIntrinsics](./Samples/simpleVoteIntrinsics)** | **[simpleCUBLASXT](./Samples/simpleCUBLASXT)** | **[simpleAttributes](./Samples/simpleAttributes)** | **[tf32TensorCoreGemm](./Samples/tf32TensorCoreGemm)** |
|
||||
**[UnifiedMemoryPerf](./Samples/UnifiedMemoryPerf)** | **[cudaCompressibleMemory](./Samples/cudaCompressibleMemory)** | **[bf16TensorCoreGemm](./Samples/bf16TensorCoreGemm)** | **[cuSolverDn_LinearSolver](./Samples/cuSolverDn_LinearSolver)** |
|
||||
**[vulkanImageCUDA](./Samples/vulkanImageCUDA)** | **[conjugateGradientMultiDeviceCG](./Samples/conjugateGradientMultiDeviceCG)** | **[matrixMulDrv](./Samples/matrixMulDrv)** | **[cuSolverSp_LinearSolver](./Samples/cuSolverSp_LinearSolver)** |
|
||||
**[simpleCUFFT](./Samples/simpleCUFFT)** | **[reduction](./Samples/reduction)** | **[nvJPEG_encoder](./Samples/nvJPEG_encoder)** | **[simpleDrvRuntime](./Samples/simpleDrvRuntime)** |
|
||||
**[simpleD3D11](./Samples/simpleD3D11)** | **[MersenneTwisterGP11213](./Samples/MersenneTwisterGP11213)** | **[simpleAWBarrier](./Samples/simpleAWBarrier)** | **[immaTensorCoreGemm](./Samples/immaTensorCoreGemm)** |
|
||||
**[bandwidthTest](./Samples/bandwidthTest)** | **[concurrentKernels](./Samples/concurrentKernels)** | **[simpleCUBLAS](./Samples/simpleCUBLAS)** | **[NV12toBGRandResize](./Samples/NV12toBGRandResize)** |
|
||||
**[simpleGL](./Samples/simpleGL)** | **[cudaTensorCoreGemm](./Samples/cudaTensorCoreGemm)** | **[jacobiCudaGraphs](./Samples/jacobiCudaGraphs)** | **[simpleVulkan](./Samples/simpleVulkan)** |
|
||||
**[vectorAdd_nvrtc](./Samples/vectorAdd_nvrtc)** | **[cannyEdgeDetectorNPP](./Samples/cannyEdgeDetectorNPP)** | **[p2pBandwidthLatencyTest](./Samples/p2pBandwidthLatencyTest)** | **[simpleVulkanMMAP](./Samples/simpleVulkanMMAP)** |
|
||||
**[cudaOpenMP](./Samples/cudaOpenMP)** | **[matrixMul](./Samples/matrixMul)** |
|
||||
### [2. Concepts and Techniques](./Samples/2_Concepts_and_Techniques/README.md)
|
||||
Samples that demonstrate CUDA related concepts and common problem solving techniques.
|
||||
|
||||
### [3. CUDA Features](./Samples/3_CUDA_Features/README.md)
|
||||
Samples that demonstrate CUDA Features (Cooperative Groups, CUDA Dynamic Parallelism, CUDA Graphs etc).
|
||||
|
||||
### [4. CUDA Libraries](./Samples/4_CUDA_Libraries/README.md)
|
||||
Samples that demonstrate how to use CUDA platform libraries (NPP, NVJPEG, NVGRAPH cuBLAS, cuFFT, cuSPARSE, cuSOLVER and cuRAND).
|
||||
|
||||
### [5. Domain Specific](./Samples/5_Domain_Specific/README.md)
|
||||
Samples that are specific to domain (Graphics, Finance, Image Processing).
|
||||
|
||||
### [6. Performance](./Samples/6_Performance/README.md)
|
||||
Samples that demonstrate performance optimization.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -209,7 +108,7 @@ These third-party dependencies are required by some CUDA samples. If available,
|
|||
|
||||
FreeImage is an open source imaging library. FreeImage can usually be installed on Linux using your distribution's package manager system. FreeImage can also be downloaded from the FreeImage website.
|
||||
|
||||
To set up FreeImage on a Windows system, extract the FreeImage DLL distribution into the folder `../../Common/FreeImage/Dist/x64` such that it contains the .h, .dll, and .lib files.
|
||||
To set up FreeImage on a Windows system, extract the FreeImage DLL distribution into the folder `../../../Common/FreeImage/Dist/x64` such that it contains the .h and .lib files. Copy the .dll file to root level `bin/win64/Debug` and `bin/win64/Release` folder.
|
||||
|
||||
#### Message Passing Interface
|
||||
|
||||
|
@ -360,5 +259,8 @@ Answers to frequently asked questions about CUDA can be found at http://develope
|
|||
## References
|
||||
|
||||
* [CUDA Programming Guide](http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html)
|
||||
* [Accelerated Computing Blog](https://devblogs.nvidia.com/category/accelerated-computing/)
|
||||
* [Accelerated Computing Blog](https://developer.nvidia.com/blog/?tags=accelerated-computing)
|
||||
|
||||
## Attributions
|
||||
|
||||
* Teapot image is obtained from [Wikimedia](https://en.wikipedia.org/wiki/File:Original_Utah_Teapot.jpg) and is licensed under the Creative Commons [Attribution-Share Alike 2.0](https://creativecommons.org/licenses/by-sa/2.0/deed.en) Generic license. The image is modified for samples use cases.
|
162
Samples/0_Introduction/README.md
Normal file
162
Samples/0_Introduction/README.md
Normal file
|
@ -0,0 +1,162 @@
|
|||
# 0. Introduction
|
||||
|
||||
|
||||
### [asyncAPI](./asyncAPI)
|
||||
This sample illustrates the usage of CUDA events for both GPU timing and overlapping CPU and GPU execution. Events are inserted into a stream of CUDA calls. Since CUDA stream calls are asynchronous, the CPU can perform computations while GPU is executing (including DMA memcopies between the host and device). CPU can query CUDA events to determine whether GPU has completed tasks.
|
||||
|
||||
### [c++11_cuda](./c++11_cuda)
|
||||
This sample demonstrates C++11 feature support in CUDA. It scans a input text file and prints no. of occurrences of x, y, z, w characters.
|
||||
|
||||
### [clock](./clock)
|
||||
This example shows how to use the clock function to measure the performance of block of threads of a kernel accurately.
|
||||
|
||||
### [clock_nvrtc](./clock_nvrtc)
|
||||
This example shows how to use the clock function using libNVRTC to measure the performance of block of threads of a kernel accurately.
|
||||
|
||||
### [concurrentKernels](./concurrentKernels)
|
||||
This sample demonstrates the use of CUDA streams for concurrent execution of several kernels on GPU device. It also illustrates how to introduce dependencies between CUDA streams with the new cudaStreamWaitEvent function.
|
||||
|
||||
### [cppIntegration](./cppIntegration)
|
||||
This example demonstrates how to integrate CUDA into an existing C++ application, i.e. the CUDA entry point on host side is only a function which is called from C++ code and only the file containing this function is compiled with nvcc. It also demonstrates that vector types can be used from cpp.
|
||||
|
||||
### [cppOverload](./cppOverload)
|
||||
This sample demonstrates how to use C++ function overloading on the GPU.
|
||||
|
||||
### [cudaOpenMP](./cudaOpenMP)
|
||||
This sample demonstrates how to use OpenMP API to write an application for multiple GPUs.
|
||||
|
||||
### [fp16ScalarProduct](./fp16ScalarProduct)
|
||||
Calculates scalar product of two vectors of FP16 numbers.
|
||||
|
||||
### [matrixMul](./matrixMul)
|
||||
This sample implements matrix multiplication and is exactly the same as Chapter 6 of the programming guide. It has been written for clarity of exposition to illustrate various CUDA programming principles, not with the goal of providing the most performant generic kernel for matrix multiplication. To illustrate GPU performance for matrix multiply, this sample also shows how to use the new CUDA 4.0 interface for CUBLAS to demonstrate high-performance performance for matrix multiplication.
|
||||
|
||||
### [matrixMul_nvrtc](./matrixMul_nvrtc)
|
||||
This sample implements matrix multiplication and is exactly the same as Chapter 6 of the programming guide. It has been written for clarity of exposition to illustrate various CUDA programming principles, not with the goal of providing the most performant generic kernel for matrix multiplication. To illustrate GPU performance for matrix multiply, this sample also shows how to use the new CUDA 4.0 interface for CUBLAS to demonstrate high-performance performance for matrix multiplication.
|
||||
|
||||
### [matrixMulDrv](./matrixMulDrv)
|
||||
This sample implements matrix multiplication and uses the new CUDA 4.0 kernel launch Driver API. It has been written for clarity of exposition to illustrate various CUDA programming principles, not with the goal of providing the most performant generic kernel for matrix multiplication. CUBLAS provides high-performance matrix multiplication.
|
||||
|
||||
### [matrixMulDynlinkJIT](./matrixMulDynlinkJIT)
|
||||
This sample revisits matrix multiplication using the CUDA driver API. It demonstrates how to link to CUDA driver at runtime and how to use JIT (just-in-time) compilation from PTX code. It has been written for clarity of exposition to illustrate various CUDA programming principles, not with the goal of providing the most performant generic kernel for matrix multiplication. CUBLAS provides high-performance matrix multiplication.
|
||||
|
||||
### [mergeSort](./mergeSort)
|
||||
This sample implements a merge sort (also known as Batcher's sort), algorithms belonging to the class of sorting networks. While generally subefficient on large sequences compared to algorithms with better asymptotic algorithmic complexity (i.e. merge sort or radix sort), may be the algorithms of choice for sorting batches of short- to mid-sized (key, value) array pairs. Refer to the excellent tutorial by H. W. Lang http://www.iti.fh-flensburg.de/lang/algorithmen/sortieren/networks/indexen.htm
|
||||
|
||||
### [simpleAssert](./simpleAssert)
|
||||
This CUDA Runtime API sample is a very basic sample that implements how to use the assert function in the device code. Requires Compute Capability 2.0 .
|
||||
|
||||
### [simpleAssert_nvrtc](./simpleAssert_nvrtc)
|
||||
This CUDA Runtime API sample is a very basic sample that implements how to use the assert function in the device code. Requires Compute Capability 2.0 .
|
||||
|
||||
### [simpleAtomicIntrinsics](./simpleAtomicIntrinsics)
|
||||
A simple demonstration of global memory atomic instructions.
|
||||
|
||||
### [simpleAtomicIntrinsics_nvrtc](./simpleAtomicIntrinsics_nvrtc)
|
||||
A simple demonstration of global memory atomic instructions.This sample makes use of NVRTC for Runtime Compilation.
|
||||
|
||||
### [simpleAttributes](./simpleAttributes)
|
||||
This CUDA Runtime API sample is a very basic example that implements how to use the stream attributes that affect L2 locality. Performance improvement due to use of L2 access policy window can only be noticed on Compute capability 8.0 or higher.
|
||||
|
||||
### [simpleAWBarrier](./simpleAWBarrier)
|
||||
A simple demonstration of arrive wait barriers.
|
||||
|
||||
### [simpleCallback](./simpleCallback)
|
||||
This sample implements multi-threaded heterogeneous computing workloads with the new CPU callbacks for CUDA streams and events introduced with CUDA 5.0.
|
||||
|
||||
### [simpleCooperativeGroups](./simpleCooperativeGroups)
|
||||
This sample is a simple code that illustrates basic usage of cooperative groups within the thread block.
|
||||
|
||||
### [simpleCubemapTexture](./simpleCubemapTexture)
|
||||
Simple example that demonstrates how to use a new CUDA 4.1 feature to support cubemap Textures in CUDA C.
|
||||
|
||||
### [simpleCUDA2GL](./simpleCUDA2GL)
|
||||
This sample shows how to copy CUDA image back to OpenGL using the most efficient methods.
|
||||
|
||||
### [simpleDrvRuntime](./simpleDrvRuntime)
|
||||
A simple example which demonstrates how CUDA Driver and Runtime APIs can work together to load cuda fatbinary of vector add kernel and performing vector addition.
|
||||
|
||||
### [simpleHyperQ](./simpleHyperQ)
|
||||
This sample demonstrates the use of CUDA streams for concurrent execution of several kernels on devices which provide HyperQ (SM 3.5). Devices without HyperQ (SM 2.0 and SM 3.0) will run a maximum of two kernels concurrently.
|
||||
|
||||
### [simpleIPC](./simpleIPC)
|
||||
This CUDA Runtime API sample is a very basic sample that demonstrates Inter Process Communication with one process per GPU for computation. Requires Compute Capability 3.0 or higher and a Linux Operating System, or a Windows Operating System with TCC enabled GPUs
|
||||
|
||||
### [simpleLayeredTexture](./simpleLayeredTexture)
|
||||
Simple example that demonstrates how to use a new CUDA 4.0 feature to support layered Textures in CUDA C.
|
||||
|
||||
### [simpleMPI](./simpleMPI)
|
||||
Simple example demonstrating how to use MPI in combination with CUDA.
|
||||
|
||||
### [simpleMultiCopy](./simpleMultiCopy)
|
||||
Supported in GPUs with Compute Capability 1.1, overlapping compute with one memcopy is possible from the host system. For Quadro and Tesla GPUs with Compute Capability 2.0, a second overlapped copy operation in either direction at full speed is possible (PCI-e is symmetric). This sample illustrates the usage of CUDA streams to achieve overlapping of kernel execution with data copies to and from the device.
|
||||
|
||||
### [simpleMultiGPU](./simpleMultiGPU)
|
||||
This application demonstrates how to use the new CUDA 4.0 API for CUDA context management and multi-threaded access to run CUDA kernels on multiple-GPUs.
|
||||
|
||||
### [simpleOccupancy](./simpleOccupancy)
|
||||
This sample demonstrates the basic usage of the CUDA occupancy calculator and occupancy-based launch configurator APIs by launching a kernel with the launch configurator, and measures the utilization difference against a manually configured launch.
|
||||
|
||||
### [simpleP2P](./simpleP2P)
|
||||
This application demonstrates CUDA APIs that support Peer-To-Peer (P2P) copies, Peer-To-Peer (P2P) addressing, and Unified Virtual Memory Addressing (UVA) between multiple GPUs. In general, P2P is supported between two same GPUs with some exceptions, such as some Tesla and Quadro GPUs.
|
||||
|
||||
### [simplePitchLinearTexture](./simplePitchLinearTexture)
|
||||
Use of Pitch Linear Textures
|
||||
|
||||
### [simplePrintf](./simplePrintf)
|
||||
This basic CUDA Runtime API sample demonstrates how to use the printf function in the device code.
|
||||
|
||||
### [simpleSeparateCompilation](./simpleSeparateCompilation)
|
||||
This sample demonstrates a CUDA 5.0 feature, the ability to create a GPU device static library and use it within another CUDA kernel. This example demonstrates how to pass in a GPU device function (from the GPU device static library) as a function pointer to be called. This sample requires devices with compute capability 2.0 or higher.
|
||||
|
||||
### [simpleStreams](./simpleStreams)
|
||||
This sample uses CUDA streams to overlap kernel executions with memory copies between the host and a GPU device. This sample uses a new CUDA 4.0 feature that supports pinning of generic host memory. Requires Compute Capability 2.0 or higher.
|
||||
|
||||
### [simpleSurfaceWrite](./simpleSurfaceWrite)
|
||||
Simple example that demonstrates the use of 2D surface references (Write-to-Texture)
|
||||
|
||||
### [simpleTemplates](./simpleTemplates)
|
||||
This sample is a templatized version of the template project. It also shows how to correctly templatize dynamically allocated shared memory arrays.
|
||||
|
||||
### [simpleTemplates_nvrtc](./simpleTemplates_nvrtc)
|
||||
This sample is a templatized version of the template project. It also shows how to correctly templatize dynamically allocated shared memory arrays.
|
||||
|
||||
### [simpleTexture](./simpleTexture)
|
||||
Simple example that demonstrates use of Textures in CUDA.
|
||||
|
||||
### [simpleTexture3D](./simpleTexture3D)
|
||||
Simple example that demonstrates use of 3D Textures in CUDA.
|
||||
|
||||
### [simpleTextureDrv](./simpleTextureDrv)
|
||||
Simple example that demonstrates use of Textures in CUDA. This sample uses the new CUDA 4.0 kernel launch Driver API.
|
||||
|
||||
### [simpleVoteIntrinsics](./simpleVoteIntrinsics)
|
||||
Simple program which demonstrates how to use the Vote (__any_sync, __all_sync) intrinsic instruction in a CUDA kernel.
|
||||
|
||||
### [simpleVoteIntrinsics_nvrtc](./simpleVoteIntrinsics_nvrtc)
|
||||
Simple program which demonstrates how to use the Vote (any, all) intrinsic instruction in a CUDA kernel with runtime compilation using NVRTC APIs. Requires Compute Capability 2.0 or higher.
|
||||
|
||||
### [simpleZeroCopy](./simpleZeroCopy)
|
||||
This sample illustrates how to use Zero MemCopy, kernels can read and write directly to pinned system memory.
|
||||
|
||||
### [systemWideAtomics](./systemWideAtomics)
|
||||
A simple demonstration of system wide atomic instructions.
|
||||
|
||||
### [template](./template)
|
||||
A trivial template project that can be used as a starting point to create new CUDA projects.
|
||||
|
||||
### [UnifiedMemoryStreams](./UnifiedMemoryStreams)
|
||||
This sample demonstrates the use of OpenMP and streams with Unified Memory on a single GPU.
|
||||
|
||||
### [vectorAdd](./vectorAdd)
|
||||
This CUDA Runtime API sample is a very basic sample that implements element by element vector addition. It is the same as the sample illustrating Chapter 3 of the programming guide with some additions like error checking.
|
||||
|
||||
### [vectorAdd_nvrtc](./vectorAdd_nvrtc)
|
||||
This CUDA Driver API sample uses NVRTC for runtime compilation of vector addition kernel. Vector addition kernel demonstrated is the same as the sample illustrating Chapter 3 of the programming guide.
|
||||
|
||||
### [vectorAddDrv](./vectorAddDrv)
|
||||
This Vector Addition sample is a basic sample that is implemented element by element. It is the same as the sample illustrating Chapter 3 of the programming guide with some additions like error checking. This sample also uses the new CUDA 4.0 kernel launch Driver API.
|
||||
|
||||
### [vectorAddMMAP](./vectorAddMMAP)
|
||||
This sample replaces the device allocation in the vectorAddDrv sample with cuMemMap-ed allocations. This sample demonstrates that the cuMemMap api allows the user to specify the physical properties of their memory while retaining the contiguous nature of their access, thus not requiring a change in their program structure.
|
||||
|
18
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/c_cpp_properties.json
vendored
Normal file
18
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/c_cpp_properties.json
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${workspaceFolder}/../../../Common"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/local/cuda/bin/nvcc",
|
||||
"cStandard": "gnu17",
|
||||
"cppStandard": "gnu++14",
|
||||
"intelliSenseMode": "linux-gcc-x64",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
7
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/extensions.json
vendored
Normal file
7
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"nvidia.nsight-vscode-edition",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.makefile-tools"
|
||||
]
|
||||
}
|
10
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/launch.json
vendored
Normal file
10
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "CUDA C++: Launch",
|
||||
"type": "cuda-gdb",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/UnifiedMemoryStreams"
|
||||
}
|
||||
]
|
||||
}
|
15
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/tasks.json
vendored
Normal file
15
Samples/0_Introduction/UnifiedMemoryStreams/.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "sample",
|
||||
"type": "shell",
|
||||
"command": "make dbg=1",
|
||||
"problemMatcher": ["$nvcc"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
392
Samples/0_Introduction/UnifiedMemoryStreams/Makefile
Normal file
392
Samples/0_Introduction/UnifiedMemoryStreams/Makefile
Normal file
|
@ -0,0 +1,392 @@
|
|||
################################################################################
|
||||
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
################################################################################
|
||||
#
|
||||
# Makefile project only supported on Mac OS X and Linux Platforms)
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Location of the CUDA Toolkit
|
||||
CUDA_PATH ?= /usr/local/cuda
|
||||
|
||||
##############################
|
||||
# start deprecated interface #
|
||||
##############################
|
||||
ifeq ($(x86_64),1)
|
||||
$(info WARNING - x86_64 variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=x86_64 instead)
|
||||
TARGET_ARCH ?= x86_64
|
||||
endif
|
||||
ifeq ($(ARMv7),1)
|
||||
$(info WARNING - ARMv7 variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=armv7l instead)
|
||||
TARGET_ARCH ?= armv7l
|
||||
endif
|
||||
ifeq ($(aarch64),1)
|
||||
$(info WARNING - aarch64 variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=aarch64 instead)
|
||||
TARGET_ARCH ?= aarch64
|
||||
endif
|
||||
ifeq ($(ppc64le),1)
|
||||
$(info WARNING - ppc64le variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=ppc64le instead)
|
||||
TARGET_ARCH ?= ppc64le
|
||||
endif
|
||||
ifneq ($(GCC),)
|
||||
$(info WARNING - GCC variable has been deprecated)
|
||||
$(info WARNING - please use HOST_COMPILER=$(GCC) instead)
|
||||
HOST_COMPILER ?= $(GCC)
|
||||
endif
|
||||
ifneq ($(abi),)
|
||||
$(error ERROR - abi variable has been removed)
|
||||
endif
|
||||
############################
|
||||
# end deprecated interface #
|
||||
############################
|
||||
|
||||
# architecture
|
||||
HOST_ARCH := $(shell uname -m)
|
||||
TARGET_ARCH ?= $(HOST_ARCH)
|
||||
ifneq (,$(filter $(TARGET_ARCH),x86_64 aarch64 sbsa ppc64le armv7l))
|
||||
ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifneq (,$(filter $(TARGET_ARCH),x86_64 aarch64 sbsa ppc64le))
|
||||
TARGET_SIZE := 64
|
||||
else ifneq (,$(filter $(TARGET_ARCH),armv7l))
|
||||
TARGET_SIZE := 32
|
||||
endif
|
||||
else
|
||||
TARGET_SIZE := $(shell getconf LONG_BIT)
|
||||
endif
|
||||
else
|
||||
$(error ERROR - unsupported value $(TARGET_ARCH) for TARGET_ARCH!)
|
||||
endif
|
||||
|
||||
# sbsa and aarch64 systems look similar. Need to differentiate them at host level for now.
|
||||
ifeq ($(HOST_ARCH),aarch64)
|
||||
ifeq ($(CUDA_PATH)/targets/sbsa-linux,$(shell ls -1d $(CUDA_PATH)/targets/sbsa-linux 2>/dev/null))
|
||||
HOST_ARCH := sbsa
|
||||
TARGET_ARCH := sbsa
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifeq (,$(filter $(HOST_ARCH)-$(TARGET_ARCH),aarch64-armv7l x86_64-armv7l x86_64-aarch64 x86_64-sbsa x86_64-ppc64le))
|
||||
$(error ERROR - cross compiling from $(HOST_ARCH) to $(TARGET_ARCH) is not supported!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# When on native aarch64 system with userspace of 32-bit, change TARGET_ARCH to armv7l
|
||||
ifeq ($(HOST_ARCH)-$(TARGET_ARCH)-$(TARGET_SIZE),aarch64-aarch64-32)
|
||||
TARGET_ARCH = armv7l
|
||||
endif
|
||||
|
||||
# operating system
|
||||
HOST_OS := $(shell uname -s 2>/dev/null | tr "[:upper:]" "[:lower:]")
|
||||
TARGET_OS ?= $(HOST_OS)
|
||||
ifeq (,$(filter $(TARGET_OS),linux darwin qnx android))
|
||||
$(error ERROR - unsupported value $(TARGET_OS) for TARGET_OS!)
|
||||
endif
|
||||
|
||||
# host compiler
|
||||
ifeq ($(TARGET_OS),darwin)
|
||||
ifeq ($(shell expr `xcodebuild -version | grep -i xcode | awk '{print $$2}' | cut -d'.' -f1` \>= 5),1)
|
||||
HOST_COMPILER ?= clang++
|
||||
endif
|
||||
else ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifeq ($(HOST_ARCH)-$(TARGET_ARCH),x86_64-armv7l)
|
||||
ifeq ($(TARGET_OS),linux)
|
||||
HOST_COMPILER ?= arm-linux-gnueabihf-g++
|
||||
else ifeq ($(TARGET_OS),qnx)
|
||||
ifeq ($(QNX_HOST),)
|
||||
$(error ERROR - QNX_HOST must be passed to the QNX host toolchain)
|
||||
endif
|
||||
ifeq ($(QNX_TARGET),)
|
||||
$(error ERROR - QNX_TARGET must be passed to the QNX target toolchain)
|
||||
endif
|
||||
export QNX_HOST
|
||||
export QNX_TARGET
|
||||
HOST_COMPILER ?= $(QNX_HOST)/usr/bin/arm-unknown-nto-qnx6.6.0eabi-g++
|
||||
else ifeq ($(TARGET_OS),android)
|
||||
HOST_COMPILER ?= arm-linux-androideabi-g++
|
||||
endif
|
||||
else ifeq ($(TARGET_ARCH),aarch64)
|
||||
ifeq ($(TARGET_OS), linux)
|
||||
HOST_COMPILER ?= aarch64-linux-gnu-g++
|
||||
else ifeq ($(TARGET_OS),qnx)
|
||||
ifeq ($(QNX_HOST),)
|
||||
$(error ERROR - QNX_HOST must be passed to the QNX host toolchain)
|
||||
endif
|
||||
ifeq ($(QNX_TARGET),)
|
||||
$(error ERROR - QNX_TARGET must be passed to the QNX target toolchain)
|
||||
endif
|
||||
export QNX_HOST
|
||||
export QNX_TARGET
|
||||
HOST_COMPILER ?= $(QNX_HOST)/usr/bin/q++
|
||||
else ifeq ($(TARGET_OS), android)
|
||||
HOST_COMPILER ?= aarch64-linux-android-clang++
|
||||
endif
|
||||
else ifeq ($(TARGET_ARCH),sbsa)
|
||||
HOST_COMPILER ?= aarch64-linux-gnu-g++
|
||||
else ifeq ($(TARGET_ARCH),ppc64le)
|
||||
HOST_COMPILER ?= powerpc64le-linux-gnu-g++
|
||||
endif
|
||||
endif
|
||||
HOST_COMPILER ?= g++
|
||||
NVCC := $(CUDA_PATH)/bin/nvcc -ccbin $(HOST_COMPILER)
|
||||
|
||||
# internal flags
|
||||
NVCCFLAGS := -m${TARGET_SIZE}
|
||||
CCFLAGS :=
|
||||
LDFLAGS :=
|
||||
|
||||
# build flags
|
||||
ifeq ($(TARGET_OS),darwin)
|
||||
LDFLAGS += -rpath $(CUDA_PATH)/lib
|
||||
CCFLAGS += -arch $(HOST_ARCH)
|
||||
else ifeq ($(HOST_ARCH)-$(TARGET_ARCH)-$(TARGET_OS),x86_64-armv7l-linux)
|
||||
LDFLAGS += --dynamic-linker=/lib/ld-linux-armhf.so.3
|
||||
CCFLAGS += -mfloat-abi=hard
|
||||
else ifeq ($(TARGET_OS),android)
|
||||
LDFLAGS += -pie
|
||||
CCFLAGS += -fpie -fpic -fexceptions
|
||||
endif
|
||||
|
||||
ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-linux)
|
||||
ifneq ($(TARGET_FS),)
|
||||
GCCVERSIONLTEQ46 := $(shell expr `$(HOST_COMPILER) -dumpversion` \<= 4.6)
|
||||
ifeq ($(GCCVERSIONLTEQ46),1)
|
||||
CCFLAGS += --sysroot=$(TARGET_FS)
|
||||
endif
|
||||
LDFLAGS += --sysroot=$(TARGET_FS)
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib/arm-linux-gnueabihf
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-linux)
|
||||
ifneq ($(TARGET_FS),)
|
||||
GCCVERSIONLTEQ46 := $(shell expr `$(HOST_COMPILER) -dumpversion` \<= 4.6)
|
||||
ifeq ($(GCCVERSIONLTEQ46),1)
|
||||
CCFLAGS += --sysroot=$(TARGET_FS)
|
||||
endif
|
||||
LDFLAGS += --sysroot=$(TARGET_FS)
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/lib -L$(TARGET_FS)/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/lib/aarch64-linux-gnu -L$(TARGET_FS)/lib/aarch64-linux-gnu
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib -L$(TARGET_FS)/usr/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib/aarch64-linux-gnu -L$(TARGET_FS)/usr/lib/aarch64-linux-gnu
|
||||
LDFLAGS += --unresolved-symbols=ignore-in-shared-libs
|
||||
CCFLAGS += -isystem=$(TARGET_FS)/usr/include -I$(TARGET_FS)/usr/include -I$(TARGET_FS)/usr/include/libdrm
|
||||
CCFLAGS += -isystem=$(TARGET_FS)/usr/include/aarch64-linux-gnu -I$(TARGET_FS)/usr/include/aarch64-linux-gnu
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-qnx)
|
||||
NVCCFLAGS += -D_QNX_SOURCE
|
||||
NVCCFLAGS += --qpp-config 8.3.0,gcc_ntoaarch64le
|
||||
CCFLAGS += -DWIN_INTERFACE_CUSTOM -I/usr/include/aarch64-qnx-gnu
|
||||
LDFLAGS += -lsocket
|
||||
LDFLAGS += -L/usr/lib/aarch64-qnx-gnu
|
||||
CCFLAGS += "-Wl\,-rpath-link\,/usr/lib/aarch64-qnx-gnu"
|
||||
ifdef TARGET_OVERRIDE
|
||||
LDFLAGS += -lslog2
|
||||
endif
|
||||
|
||||
ifneq ($(TARGET_FS),)
|
||||
LDFLAGS += -L$(TARGET_FS)/usr/lib
|
||||
CCFLAGS += "-Wl\,-rpath-link\,$(TARGET_FS)/usr/lib"
|
||||
LDFLAGS += -L$(TARGET_FS)/usr/libnvidia
|
||||
CCFLAGS += "-Wl\,-rpath-link\,$(TARGET_FS)/usr/libnvidia"
|
||||
CCFLAGS += -I$(TARGET_FS)/../include
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef TARGET_OVERRIDE # cuda toolkit targets override
|
||||
NVCCFLAGS += -target-dir $(TARGET_OVERRIDE)
|
||||
endif
|
||||
|
||||
# Install directory of different arch
|
||||
CUDA_INSTALL_TARGET_DIR :=
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-linux)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/armv7-linux-gnueabihf/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-linux)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/aarch64-linux/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),sbsa-linux)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/sbsa-linux/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-android)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/armv7-linux-androideabi/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-android)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/aarch64-linux-androideabi/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-qnx)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/ARMv7-linux-QNX/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-qnx)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/aarch64-qnx/
|
||||
else ifeq ($(TARGET_ARCH),ppc64le)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/ppc64le-linux/
|
||||
endif
|
||||
|
||||
# Debug build flags
|
||||
ifeq ($(dbg),1)
|
||||
NVCCFLAGS += -g -G
|
||||
BUILD_TYPE := debug
|
||||
else
|
||||
BUILD_TYPE := release
|
||||
endif
|
||||
|
||||
ALL_CCFLAGS :=
|
||||
ALL_CCFLAGS += $(NVCCFLAGS)
|
||||
ALL_CCFLAGS += $(EXTRA_NVCCFLAGS)
|
||||
ALL_CCFLAGS += $(addprefix -Xcompiler ,$(CCFLAGS))
|
||||
ALL_CCFLAGS += $(addprefix -Xcompiler ,$(EXTRA_CCFLAGS))
|
||||
|
||||
UBUNTU = $(shell lsb_release -i -s 2>/dev/null | grep -i ubuntu)
|
||||
|
||||
SAMPLE_ENABLED := 1
|
||||
|
||||
# This sample is not supported on QNX
|
||||
ifeq ($(TARGET_OS),qnx)
|
||||
$(info >>> WARNING - UnifiedMemoryStreams is not supported on QNX - waiving sample <<<)
|
||||
SAMPLE_ENABLED := 0
|
||||
endif
|
||||
|
||||
ALL_LDFLAGS :=
|
||||
ALL_LDFLAGS += $(ALL_CCFLAGS)
|
||||
ALL_LDFLAGS += $(addprefix -Xlinker ,$(LDFLAGS))
|
||||
ALL_LDFLAGS += $(addprefix -Xlinker ,$(EXTRA_LDFLAGS))
|
||||
|
||||
# Common includes and paths for CUDA
|
||||
INCLUDES := -I../../../Common
|
||||
LIBRARIES :=
|
||||
|
||||
################################################################################
|
||||
|
||||
# Attempt to compile a minimal OpenMP application. If a.out exists, OpenMP is properly set up.
|
||||
ifneq (,$(filter $(TARGET_OS),linux android))
|
||||
|
||||
# Special treatment for Clang to not use standard OMP Library and fix OMP 5 bug in Clang 13
|
||||
ifneq (,$(findstring "clang",$(HOST_COMPILER)))
|
||||
ifneq (,$(filter $(TARGET_OS), android))
|
||||
LIBRARIES += -lomp
|
||||
else
|
||||
LIBRARIES += -lgomp
|
||||
endif
|
||||
ALL_CCFLAGS += -Xcompiler -fopenmp
|
||||
else
|
||||
ALL_CCFLAGS += -Xcompiler -fopenmp
|
||||
ALL_LDFLAGS += -Xcompiler -fopenmp
|
||||
COMPILER_VERSION= $(shell $(HOST_COMPILER) --version)
|
||||
ifneq (,$(findstring 13.,$(COMPILER_VERSION)))
|
||||
ALL_CCFLAGS += -Xcompiler -fopenmp -Xcompiler -fopenmp-version=45
|
||||
ALL_LDFLAGS += -Xcompiler -fopenmp -Xcompiler -fopenmp-version=45
|
||||
endif
|
||||
endif
|
||||
|
||||
$(shell echo "#include <omp.h>" > test.c ; echo "int main() { omp_get_num_threads(); return 0; }" >> test.c ; $(HOST_COMPILER) -fopenmp test.c)
|
||||
OPENMP ?= $(shell find a.out 2>/dev/null)
|
||||
|
||||
ifeq ($(OPENMP),)
|
||||
$(info -----------------------------------------------------------------------------------------------)
|
||||
$(info WARNING - OpenMP is unable to compile)
|
||||
$(info -----------------------------------------------------------------------------------------------)
|
||||
$(info This CUDA Sample cannot be built if the OpenMP compiler is not set up correctly.)
|
||||
$(info This will be a dry-run of the Makefile.)
|
||||
$(info For more information on how to set up your environment to build and run this )
|
||||
$(info sample, please refer the CUDA Samples documentation and release notes)
|
||||
$(info -----------------------------------------------------------------------------------------------)
|
||||
SAMPLE_ENABLED := 0
|
||||
endif
|
||||
|
||||
$(shell rm a.out test.c 2>/dev/null)
|
||||
else
|
||||
LIBRARIES += -lpthread
|
||||
ALL_CCFLAGS += -DUSE_PTHREADS
|
||||
endif
|
||||
|
||||
# Gencode arguments
|
||||
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
|
||||
SMS ?= 53 61 70 72 75 80 86 87
|
||||
else
|
||||
SMS ?= 35 37 50 52 60 61 70 75 80 86
|
||||
endif
|
||||
|
||||
ifeq ($(SMS),)
|
||||
$(info >>> WARNING - no SM architectures have been specified - waiving sample <<<)
|
||||
SAMPLE_ENABLED := 0
|
||||
endif
|
||||
|
||||
ifeq ($(GENCODE_FLAGS),)
|
||||
# Generate SASS code for each SM architecture listed in $(SMS)
|
||||
$(foreach sm,$(SMS),$(eval GENCODE_FLAGS += -gencode arch=compute_$(sm),code=sm_$(sm)))
|
||||
|
||||
# Generate PTX code from the highest SM architecture in $(SMS) to guarantee forward-compatibility
|
||||
HIGHEST_SM := $(lastword $(sort $(SMS)))
|
||||
ifneq ($(HIGHEST_SM),)
|
||||
GENCODE_FLAGS += -gencode arch=compute_$(HIGHEST_SM),code=compute_$(HIGHEST_SM)
|
||||
endif
|
||||
endif
|
||||
|
||||
ALL_CCFLAGS += --threads 0 --std=c++11
|
||||
|
||||
LIBRARIES += -lcublas
|
||||
|
||||
ifeq ($(SAMPLE_ENABLED),0)
|
||||
EXEC ?= @echo "[@]"
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
# Target rules
|
||||
all: build
|
||||
|
||||
build: UnifiedMemoryStreams
|
||||
|
||||
check.deps:
|
||||
ifeq ($(SAMPLE_ENABLED),0)
|
||||
@echo "Sample will be waived due to the above missing dependencies"
|
||||
else
|
||||
@echo "Sample is ready - all dependencies have been met"
|
||||
endif
|
||||
|
||||
UnifiedMemoryStreams.o:UnifiedMemoryStreams.cu
|
||||
$(EXEC) $(NVCC) $(INCLUDES) $(ALL_CCFLAGS) $(GENCODE_FLAGS) -o $@ -c $<
|
||||
|
||||
UnifiedMemoryStreams: UnifiedMemoryStreams.o
|
||||
$(EXEC) $(NVCC) $(ALL_LDFLAGS) $(GENCODE_FLAGS) -o $@ $+ $(LIBRARIES)
|
||||
$(EXEC) mkdir -p ../../../bin/$(TARGET_ARCH)/$(TARGET_OS)/$(BUILD_TYPE)
|
||||
$(EXEC) cp $@ ../../../bin/$(TARGET_ARCH)/$(TARGET_OS)/$(BUILD_TYPE)
|
||||
|
||||
run: build
|
||||
$(EXEC) ./UnifiedMemoryStreams
|
||||
|
||||
testrun: build
|
||||
|
||||
clean:
|
||||
rm -f UnifiedMemoryStreams UnifiedMemoryStreams.o
|
||||
rm -rf ../../../bin/$(TARGET_ARCH)/$(TARGET_OS)/$(BUILD_TYPE)/UnifiedMemoryStreams
|
||||
|
||||
clobber: clean
|
101
Samples/0_Introduction/UnifiedMemoryStreams/NsightEclipse.xml
Normal file
101
Samples/0_Introduction/UnifiedMemoryStreams/NsightEclipse.xml
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE entry SYSTEM "SamplesInfo.dtd">
|
||||
<entry>
|
||||
<name>UnifiedMemoryStreams</name>
|
||||
<cuda_api_list>
|
||||
<toolkit>cudaStreamDestroy</toolkit>
|
||||
<toolkit>cudaFree</toolkit>
|
||||
<toolkit>cudaMallocManaged</toolkit>
|
||||
<toolkit>cudaStreamCreate</toolkit>
|
||||
<toolkit>cudaDeviceSynchronize</toolkit>
|
||||
<toolkit>cudaStreamAttachMemAsync</toolkit>
|
||||
<toolkit>cudaSetDevice</toolkit>
|
||||
<toolkit>cudaStreamSynchronize</toolkit>
|
||||
<toolkit>cudaGetDeviceProperties</toolkit>
|
||||
</cuda_api_list>
|
||||
<description><![CDATA[This sample demonstrates the use of OpenMP and streams with Unified Memory on a single GPU.]]></description>
|
||||
<devicecompilation>whole</devicecompilation>
|
||||
<includepaths>
|
||||
<path>./</path>
|
||||
<path>../</path>
|
||||
<path>../../../Common</path>
|
||||
</includepaths>
|
||||
<keyconcepts>
|
||||
<concept level="basic">CUDA Systems Integration</concept>
|
||||
<concept level="basic">OpenMP</concept>
|
||||
<concept level="basic">CUBLAS</concept>
|
||||
<concept level="basic">Multithreading</concept>
|
||||
<concept level="basic">Unified Memory</concept>
|
||||
<concept level="basic">CUDA Streams and Events</concept>
|
||||
</keyconcepts>
|
||||
<keywords>
|
||||
<keyword>CUDA</keyword>
|
||||
<keyword>CUBLAS</keyword>
|
||||
<keyword>OpenMP</keyword>
|
||||
<keyword>cluster</keyword>
|
||||
<keyword>multi-GPU Support</keyword>
|
||||
<keyword>Unified Memory</keyword>
|
||||
<keyword>UVM</keyword>
|
||||
<keyword>openMP</keyword>
|
||||
<keyword>Streams</keyword>
|
||||
<keyword>pthreads</keyword>
|
||||
</keywords>
|
||||
<libraries>
|
||||
<library>cublas</library>
|
||||
</libraries>
|
||||
<librarypaths>
|
||||
</librarypaths>
|
||||
<nsight_eclipse>true</nsight_eclipse>
|
||||
<primary_file>UnifiedMemoryStreams.cu</primary_file>
|
||||
<required_dependencies>
|
||||
<dependency>OpenMP</dependency>
|
||||
<dependency>UVM</dependency>
|
||||
<dependency>CUBLAS</dependency>
|
||||
</required_dependencies>
|
||||
<scopes>
|
||||
<scope>1:CUDA Basic Topics</scope>
|
||||
<scope>1:CUDA Systems Integration</scope>
|
||||
<scope>1:Unified Memory</scope>
|
||||
</scopes>
|
||||
<sm-arch>sm35</sm-arch>
|
||||
<sm-arch>sm37</sm-arch>
|
||||
<sm-arch>sm50</sm-arch>
|
||||
<sm-arch>sm52</sm-arch>
|
||||
<sm-arch>sm53</sm-arch>
|
||||
<sm-arch>sm60</sm-arch>
|
||||
<sm-arch>sm61</sm-arch>
|
||||
<sm-arch>sm70</sm-arch>
|
||||
<sm-arch>sm72</sm-arch>
|
||||
<sm-arch>sm75</sm-arch>
|
||||
<sm-arch>sm80</sm-arch>
|
||||
<sm-arch>sm86</sm-arch>
|
||||
<sm-arch>sm87</sm-arch>
|
||||
<supported_envs>
|
||||
<env>
|
||||
<arch>x86_64</arch>
|
||||
<platform>linux</platform>
|
||||
</env>
|
||||
<env>
|
||||
<arch>x86_64</arch>
|
||||
<platform>macosx</platform>
|
||||
</env>
|
||||
<env>
|
||||
<platform>windows7</platform>
|
||||
</env>
|
||||
<env>
|
||||
<arch>arm</arch>
|
||||
</env>
|
||||
<env>
|
||||
<arch>sbsa</arch>
|
||||
</env>
|
||||
<env>
|
||||
<arch>ppc64le</arch>
|
||||
<platform>linux</platform>
|
||||
</env>
|
||||
</supported_envs>
|
||||
<supported_sm_architectures>
|
||||
<from>3.5</from>
|
||||
</supported_sm_architectures>
|
||||
<title>Unified Memory Streams</title>
|
||||
<type>exe</type>
|
||||
</entry>
|
74
Samples/0_Introduction/UnifiedMemoryStreams/README.md
Normal file
74
Samples/0_Introduction/UnifiedMemoryStreams/README.md
Normal file
|
@ -0,0 +1,74 @@
|
|||
# UnifiedMemoryStreams - Unified Memory Streams
|
||||
|
||||
## Description
|
||||
|
||||
This sample demonstrates the use of OpenMP and streams with Unified Memory on a single GPU.
|
||||
|
||||
## Key Concepts
|
||||
|
||||
CUDA Systems Integration, OpenMP, CUBLAS, Multithreading, Unified Memory, CUDA Streams and Events
|
||||
|
||||
## Supported SM Architectures
|
||||
|
||||
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus)
|
||||
|
||||
## Supported OSes
|
||||
|
||||
Linux, Windows
|
||||
|
||||
## Supported CPU Architecture
|
||||
|
||||
x86_64, ppc64le, armv7l
|
||||
|
||||
## CUDA APIs involved
|
||||
|
||||
### [CUDA Runtime API](http://docs.nvidia.com/cuda/cuda-runtime-api/index.html)
|
||||
cudaStreamDestroy, cudaFree, cudaMallocManaged, cudaStreamCreate, cudaDeviceSynchronize, cudaStreamAttachMemAsync, cudaSetDevice, cudaStreamSynchronize, cudaGetDeviceProperties
|
||||
|
||||
## Dependencies needed to build/run
|
||||
[OpenMP](../../../README.md#openmp), [UVM](../../../README.md#uvm), [CUBLAS](../../../README.md#cublas)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Download and install the [CUDA Toolkit 11.6](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
|
||||
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
|
||||
|
||||
## Build and Run
|
||||
|
||||
### Windows
|
||||
The Windows samples are built using the Visual Studio IDE. Solution files (.sln) are provided for each supported version of Visual Studio, using the format:
|
||||
```
|
||||
*_vs<version>.sln - for Visual Studio <version>
|
||||
```
|
||||
Each individual sample has its own set of solution files in its directory:
|
||||
|
||||
To build/examine all the samples at once, the complete solution files should be used. To build/examine a single sample, the individual sample solution files should be used.
|
||||
> **Note:** Some samples require that the Microsoft DirectX SDK (June 2010 or newer) be installed and that the VC++ directory paths are properly set up (**Tools > Options...**). Check DirectX Dependencies section for details."
|
||||
|
||||
### Linux
|
||||
The Linux samples are built using makefiles. To use the makefiles, change the current directory to the sample directory you wish to build, and run make:
|
||||
```
|
||||
$ cd <sample_dir>
|
||||
$ make
|
||||
```
|
||||
The samples makefiles can take advantage of certain options:
|
||||
* **TARGET_ARCH=<arch>** - cross-compile targeting a specific architecture. Allowed architectures are x86_64, ppc64le, armv7l.
|
||||
By default, TARGET_ARCH is set to HOST_ARCH. On a x86_64 machine, not setting TARGET_ARCH is the equivalent of setting TARGET_ARCH=x86_64.<br/>
|
||||
`$ make TARGET_ARCH=x86_64` <br/> `$ make TARGET_ARCH=ppc64le` <br/> `$ make TARGET_ARCH=armv7l` <br/>
|
||||
See [here](http://docs.nvidia.com/cuda/cuda-samples/index.html#cross-samples) for more details.
|
||||
* **dbg=1** - build with debug symbols
|
||||
```
|
||||
$ make dbg=1
|
||||
```
|
||||
* **SMS="A B ..."** - override the SM architectures for which the sample will be built, where `"A B ..."` is a space-delimited list of SM architectures. For example, to generate SASS for SM 50 and SM 60, use `SMS="50 60"`.
|
||||
```
|
||||
$ make SMS="50 60"
|
||||
```
|
||||
|
||||
* **HOST_COMPILER=<host_compiler>** - override the default g++ host compiler. See the [Linux Installation Guide](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements) for a list of supported host compilers.
|
||||
```
|
||||
$ make HOST_COMPILER=g++
|
||||
```
|
||||
|
||||
## References (for more details)
|
||||
|
|
@ -0,0 +1,341 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This sample implements a simple task consumer using threads and streams
|
||||
* with all data in Unified Memory, and tasks consumed by both host and device
|
||||
*/
|
||||
|
||||
// system includes
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#ifdef USE_PTHREADS
|
||||
#include <pthread.h>
|
||||
#else
|
||||
#include <omp.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
// cuBLAS
|
||||
#include <cublas_v2.h>
|
||||
|
||||
// utilities
|
||||
#include <helper_cuda.h>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
|
||||
// SRAND48 and DRAND48 don't exist on windows, but these are the equivalent
|
||||
// functions
|
||||
void srand48(long seed) { srand((unsigned int)seed); }
|
||||
double drand48() { return double(rand()) / RAND_MAX; }
|
||||
#endif
|
||||
|
||||
const char *sSDKname = "UnifiedMemoryStreams";
|
||||
|
||||
// simple task
|
||||
template <typename T>
|
||||
struct Task {
|
||||
unsigned int size, id;
|
||||
T *data;
|
||||
T *result;
|
||||
T *vector;
|
||||
|
||||
Task() : size(0), id(0), data(NULL), result(NULL), vector(NULL){};
|
||||
Task(unsigned int s) : size(s), id(0), data(NULL), result(NULL) {
|
||||
// allocate unified memory -- the operation performed in this example will
|
||||
// be a DGEMV
|
||||
checkCudaErrors(cudaMallocManaged(&data, sizeof(T) * size * size));
|
||||
checkCudaErrors(cudaMallocManaged(&result, sizeof(T) * size));
|
||||
checkCudaErrors(cudaMallocManaged(&vector, sizeof(T) * size));
|
||||
checkCudaErrors(cudaDeviceSynchronize());
|
||||
}
|
||||
|
||||
~Task() {
|
||||
// ensure all memory is deallocated
|
||||
checkCudaErrors(cudaDeviceSynchronize());
|
||||
checkCudaErrors(cudaFree(data));
|
||||
checkCudaErrors(cudaFree(result));
|
||||
checkCudaErrors(cudaFree(vector));
|
||||
}
|
||||
|
||||
void allocate(const unsigned int s, const unsigned int unique_id) {
|
||||
// allocate unified memory outside of constructor
|
||||
id = unique_id;
|
||||
size = s;
|
||||
checkCudaErrors(cudaMallocManaged(&data, sizeof(T) * size * size));
|
||||
checkCudaErrors(cudaMallocManaged(&result, sizeof(T) * size));
|
||||
checkCudaErrors(cudaMallocManaged(&vector, sizeof(T) * size));
|
||||
checkCudaErrors(cudaDeviceSynchronize());
|
||||
|
||||
// populate data with random elements
|
||||
for (unsigned int i = 0; i < size * size; i++) {
|
||||
data[i] = drand48();
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < size; i++) {
|
||||
result[i] = 0.;
|
||||
vector[i] = drand48();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef USE_PTHREADS
|
||||
struct threadData_t {
|
||||
int tid;
|
||||
Task<double> *TaskListPtr;
|
||||
cudaStream_t *streams;
|
||||
cublasHandle_t *handles;
|
||||
int taskSize;
|
||||
};
|
||||
|
||||
typedef struct threadData_t threadData;
|
||||
#endif
|
||||
|
||||
// simple host dgemv: assume data is in row-major format and square
|
||||
template <typename T>
|
||||
void gemv(int m, int n, T alpha, T *A, T *x, T beta, T *result) {
|
||||
// rows
|
||||
for (int i = 0; i < n; i++) {
|
||||
result[i] *= beta;
|
||||
|
||||
for (int j = 0; j < n; j++) {
|
||||
result[i] += A[i * n + j] * x[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// execute a single task on either host or device depending on size
|
||||
#ifdef USE_PTHREADS
|
||||
void *execute(void *inpArgs) {
|
||||
threadData *dataPtr = (threadData *)inpArgs;
|
||||
cudaStream_t *stream = dataPtr->streams;
|
||||
cublasHandle_t *handle = dataPtr->handles;
|
||||
int tid = dataPtr->tid;
|
||||
|
||||
for (int i = 0; i < dataPtr->taskSize; i++) {
|
||||
Task<double> &t = dataPtr->TaskListPtr[i];
|
||||
|
||||
if (t.size < 100) {
|
||||
// perform on host
|
||||
printf("Task [%d], thread [%d] executing on host (%d)\n", t.id, tid,
|
||||
t.size);
|
||||
|
||||
// attach managed memory to a (dummy) stream to allow host access while
|
||||
// the device is running
|
||||
checkCudaErrors(
|
||||
cudaStreamAttachMemAsync(stream[0], t.data, 0, cudaMemAttachHost));
|
||||
checkCudaErrors(
|
||||
cudaStreamAttachMemAsync(stream[0], t.vector, 0, cudaMemAttachHost));
|
||||
checkCudaErrors(
|
||||
cudaStreamAttachMemAsync(stream[0], t.result, 0, cudaMemAttachHost));
|
||||
// necessary to ensure Async cudaStreamAttachMemAsync calls have finished
|
||||
checkCudaErrors(cudaStreamSynchronize(stream[0]));
|
||||
// call the host operation
|
||||
gemv(t.size, t.size, 1.0, t.data, t.vector, 0.0, t.result);
|
||||
} else {
|
||||
// perform on device
|
||||
printf("Task [%d], thread [%d] executing on device (%d)\n", t.id, tid,
|
||||
t.size);
|
||||
double one = 1.0;
|
||||
double zero = 0.0;
|
||||
|
||||
// attach managed memory to my stream
|
||||
checkCudaErrors(cublasSetStream(handle[tid + 1], stream[tid + 1]));
|
||||
checkCudaErrors(cudaStreamAttachMemAsync(stream[tid + 1], t.data, 0,
|
||||
cudaMemAttachSingle));
|
||||
checkCudaErrors(cudaStreamAttachMemAsync(stream[tid + 1], t.vector, 0,
|
||||
cudaMemAttachSingle));
|
||||
checkCudaErrors(cudaStreamAttachMemAsync(stream[tid + 1], t.result, 0,
|
||||
cudaMemAttachSingle));
|
||||
// call the device operation
|
||||
checkCudaErrors(cublasDgemv(handle[tid + 1], CUBLAS_OP_N, t.size, t.size,
|
||||
&one, t.data, t.size, t.vector, 1, &zero,
|
||||
t.result, 1));
|
||||
}
|
||||
}
|
||||
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
#else
|
||||
template <typename T>
|
||||
void execute(Task<T> &t, cublasHandle_t *handle, cudaStream_t *stream,
|
||||
int tid) {
|
||||
if (t.size < 100) {
|
||||
// perform on host
|
||||
printf("Task [%d], thread [%d] executing on host (%d)\n", t.id, tid,
|
||||
t.size);
|
||||
|
||||
// attach managed memory to a (dummy) stream to allow host access while the
|
||||
// device is running
|
||||
checkCudaErrors(
|
||||
cudaStreamAttachMemAsync(stream[0], t.data, 0, cudaMemAttachHost));
|
||||
checkCudaErrors(
|
||||
cudaStreamAttachMemAsync(stream[0], t.vector, 0, cudaMemAttachHost));
|
||||
checkCudaErrors(
|
||||
cudaStreamAttachMemAsync(stream[0], t.result, 0, cudaMemAttachHost));
|
||||
// necessary to ensure Async cudaStreamAttachMemAsync calls have finished
|
||||
checkCudaErrors(cudaStreamSynchronize(stream[0]));
|
||||
// call the host operation
|
||||
gemv(t.size, t.size, 1.0, t.data, t.vector, 0.0, t.result);
|
||||
} else {
|
||||
// perform on device
|
||||
printf("Task [%d], thread [%d] executing on device (%d)\n", t.id, tid,
|
||||
t.size);
|
||||
double one = 1.0;
|
||||
double zero = 0.0;
|
||||
|
||||
// attach managed memory to my stream
|
||||
checkCudaErrors(cublasSetStream(handle[tid + 1], stream[tid + 1]));
|
||||
checkCudaErrors(cudaStreamAttachMemAsync(stream[tid + 1], t.data, 0,
|
||||
cudaMemAttachSingle));
|
||||
checkCudaErrors(cudaStreamAttachMemAsync(stream[tid + 1], t.vector, 0,
|
||||
cudaMemAttachSingle));
|
||||
checkCudaErrors(cudaStreamAttachMemAsync(stream[tid + 1], t.result, 0,
|
||||
cudaMemAttachSingle));
|
||||
// call the device operation
|
||||
checkCudaErrors(cublasDgemv(handle[tid + 1], CUBLAS_OP_N, t.size, t.size,
|
||||
&one, t.data, t.size, t.vector, 1, &zero,
|
||||
t.result, 1));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// populate a list of tasks with random sizes
|
||||
template <typename T>
|
||||
void initialise_tasks(std::vector<Task<T> > &TaskList) {
|
||||
for (unsigned int i = 0; i < TaskList.size(); i++) {
|
||||
// generate random size
|
||||
int size;
|
||||
size = std::max((int)(drand48() * 1000.0), 64);
|
||||
TaskList[i].allocate(size, i);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
// set device
|
||||
cudaDeviceProp device_prop;
|
||||
int dev_id = findCudaDevice(argc, (const char **)argv);
|
||||
checkCudaErrors(cudaGetDeviceProperties(&device_prop, dev_id));
|
||||
|
||||
if (!device_prop.managedMemory) {
|
||||
// This samples requires being run on a device that supports Unified Memory
|
||||
fprintf(stderr, "Unified Memory not supported on this device\n");
|
||||
|
||||
exit(EXIT_WAIVED);
|
||||
}
|
||||
|
||||
if (device_prop.computeMode == cudaComputeModeProhibited) {
|
||||
// This sample requires being run with a default or process exclusive mode
|
||||
fprintf(stderr,
|
||||
"This sample requires a device in either default or process "
|
||||
"exclusive mode\n");
|
||||
|
||||
exit(EXIT_WAIVED);
|
||||
}
|
||||
|
||||
// randomise task sizes
|
||||
int seed = (int)time(NULL);
|
||||
srand48(seed);
|
||||
|
||||
// set number of threads
|
||||
const int nthreads = 4;
|
||||
|
||||
// number of streams = number of threads
|
||||
cudaStream_t *streams = new cudaStream_t[nthreads + 1];
|
||||
cublasHandle_t *handles = new cublasHandle_t[nthreads + 1];
|
||||
|
||||
for (int i = 0; i < nthreads + 1; i++) {
|
||||
checkCudaErrors(cudaStreamCreate(&streams[i]));
|
||||
checkCudaErrors(cublasCreate(&handles[i]));
|
||||
}
|
||||
|
||||
// create list of N tasks
|
||||
unsigned int N = 40;
|
||||
std::vector<Task<double> > TaskList(N);
|
||||
initialise_tasks(TaskList);
|
||||
|
||||
printf("Executing tasks on host / device\n");
|
||||
|
||||
// run through all tasks using threads and streams
|
||||
#ifdef USE_PTHREADS
|
||||
pthread_t threads[nthreads];
|
||||
threadData *InputToThreads = new threadData[nthreads];
|
||||
|
||||
for (int i = 0; i < nthreads; i++) {
|
||||
checkCudaErrors(cudaSetDevice(dev_id));
|
||||
InputToThreads[i].tid = i;
|
||||
InputToThreads[i].streams = streams;
|
||||
InputToThreads[i].handles = handles;
|
||||
|
||||
if ((TaskList.size() / nthreads) == 0) {
|
||||
InputToThreads[i].taskSize = (TaskList.size() / nthreads);
|
||||
InputToThreads[i].TaskListPtr =
|
||||
&TaskList[i * (TaskList.size() / nthreads)];
|
||||
} else {
|
||||
if (i == nthreads - 1) {
|
||||
InputToThreads[i].taskSize =
|
||||
(TaskList.size() / nthreads) + (TaskList.size() % nthreads);
|
||||
InputToThreads[i].TaskListPtr =
|
||||
&TaskList[i * (TaskList.size() / nthreads) +
|
||||
(TaskList.size() % nthreads)];
|
||||
} else {
|
||||
InputToThreads[i].taskSize = (TaskList.size() / nthreads);
|
||||
InputToThreads[i].TaskListPtr =
|
||||
&TaskList[i * (TaskList.size() / nthreads)];
|
||||
}
|
||||
}
|
||||
|
||||
pthread_create(&threads[i], NULL, &execute, &InputToThreads[i]);
|
||||
}
|
||||
for (int i = 0; i < nthreads; i++) {
|
||||
pthread_join(threads[i], NULL);
|
||||
}
|
||||
#else
|
||||
omp_set_num_threads(nthreads);
|
||||
#pragma omp parallel for schedule(dynamic)
|
||||
for (int i = 0; i < TaskList.size(); i++) {
|
||||
checkCudaErrors(cudaSetDevice(dev_id));
|
||||
int tid = omp_get_thread_num();
|
||||
execute(TaskList[i], handles, streams, tid);
|
||||
}
|
||||
#endif
|
||||
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
// Destroy CUDA Streams, cuBlas handles
|
||||
for (int i = 0; i < nthreads + 1; i++) {
|
||||
cudaStreamDestroy(streams[i]);
|
||||
cublasDestroy(handles[i]);
|
||||
}
|
||||
|
||||
// Free TaskList
|
||||
std::vector<Task<double> >().swap(TaskList);
|
||||
|
||||
printf("All Done!\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2017
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnifiedMemoryStreams", "UnifiedMemoryStreams_vs2017.vcxproj", "{997E0757-EA74-4A4E-A0FC-47D8C8831A15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.Build.0 = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.ActiveCfg = Release|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,113 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CUDAPropsPath Condition="'$(CUDAPropsPath)'==''">$(VCTargetsPath)\BuildCustomizations</CUDAPropsPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{997E0757-EA74-4A4E-A0FC-47D8C8831A15}</ProjectGuid>
|
||||
<RootNamespace>UnifiedMemoryStreams_vs2017</RootNamespace>
|
||||
<ProjectName>UnifiedMemoryStreams</ProjectName>
|
||||
<CudaToolkitCustomDir />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'==''">
|
||||
<LatestTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</LatestTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
<TargetPlatformVersion>$(WindowsTargetPlatformVersion)</TargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IntDir>$(Platform)/$(Configuration)/</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules />
|
||||
<CodeAnalysisRuleAssemblies />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<OutDir>../../../bin/win64/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./;$(CudaToolkitDir)/include;../../../Common;$(CudaToolkitIncludeDir);</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>cublas.lib;cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(CudaToolkitLibDir);</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)/UnifiedMemoryStreams.exe</OutputFile>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;</CodeGeneration>
|
||||
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
|
||||
<Include>./;../../../Common</Include>
|
||||
<Defines>WIN32</Defines>
|
||||
<AdditionalCompilerOptions>/openmp</AdditionalCompilerOptions>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MTd</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MT</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="UnifiedMemoryStreams.cu" />
|
||||
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2019
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnifiedMemoryStreams", "UnifiedMemoryStreams_vs2019.vcxproj", "{997E0757-EA74-4A4E-A0FC-47D8C8831A15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.Build.0 = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.ActiveCfg = Release|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CUDAPropsPath Condition="'$(CUDAPropsPath)'==''">$(VCTargetsPath)\BuildCustomizations</CUDAPropsPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{997E0757-EA74-4A4E-A0FC-47D8C8831A15}</ProjectGuid>
|
||||
<RootNamespace>UnifiedMemoryStreams_vs2019</RootNamespace>
|
||||
<ProjectName>UnifiedMemoryStreams</ProjectName>
|
||||
<CudaToolkitCustomDir />
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IntDir>$(Platform)/$(Configuration)/</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules />
|
||||
<CodeAnalysisRuleAssemblies />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<OutDir>../../../bin/win64/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./;$(CudaToolkitDir)/include;../../../Common;$(CudaToolkitIncludeDir);</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>cublas.lib;cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(CudaToolkitLibDir);</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)/UnifiedMemoryStreams.exe</OutputFile>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;</CodeGeneration>
|
||||
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
|
||||
<Include>./;../../../Common</Include>
|
||||
<Defines>WIN32</Defines>
|
||||
<AdditionalCompilerOptions>/openmp</AdditionalCompilerOptions>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MTd</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MT</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="UnifiedMemoryStreams.cu" />
|
||||
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2022
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnifiedMemoryStreams", "UnifiedMemoryStreams_vs2022.vcxproj", "{997E0757-EA74-4A4E-A0FC-47D8C8831A15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.Build.0 = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.ActiveCfg = Release|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CUDAPropsPath Condition="'$(CUDAPropsPath)'==''">$(VCTargetsPath)\BuildCustomizations</CUDAPropsPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{997E0757-EA74-4A4E-A0FC-47D8C8831A15}</ProjectGuid>
|
||||
<RootNamespace>UnifiedMemoryStreams_vs2022</RootNamespace>
|
||||
<ProjectName>UnifiedMemoryStreams</ProjectName>
|
||||
<CudaToolkitCustomDir />
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IntDir>$(Platform)/$(Configuration)/</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules />
|
||||
<CodeAnalysisRuleAssemblies />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<OutDir>../../../bin/win64/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./;$(CudaToolkitDir)/include;../../../Common;$(CudaToolkitIncludeDir);</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>cublas.lib;cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(CudaToolkitLibDir);</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)/UnifiedMemoryStreams.exe</OutputFile>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;</CodeGeneration>
|
||||
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
|
||||
<Include>./;../../../Common</Include>
|
||||
<Defines>WIN32</Defines>
|
||||
<AdditionalCompilerOptions>/openmp</AdditionalCompilerOptions>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MTd</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MT</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="UnifiedMemoryStreams.cu" />
|
||||
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
18
Samples/0_Introduction/asyncAPI/.vscode/c_cpp_properties.json
vendored
Normal file
18
Samples/0_Introduction/asyncAPI/.vscode/c_cpp_properties.json
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${workspaceFolder}/../../../Common"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/local/cuda/bin/nvcc",
|
||||
"cStandard": "gnu17",
|
||||
"cppStandard": "gnu++14",
|
||||
"intelliSenseMode": "linux-gcc-x64",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
7
Samples/0_Introduction/asyncAPI/.vscode/extensions.json
vendored
Normal file
7
Samples/0_Introduction/asyncAPI/.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"nvidia.nsight-vscode-edition",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.makefile-tools"
|
||||
]
|
||||
}
|
10
Samples/0_Introduction/asyncAPI/.vscode/launch.json
vendored
Normal file
10
Samples/0_Introduction/asyncAPI/.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "CUDA C++: Launch",
|
||||
"type": "cuda-gdb",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/asyncAPI"
|
||||
}
|
||||
]
|
||||
}
|
15
Samples/0_Introduction/asyncAPI/.vscode/tasks.json
vendored
Normal file
15
Samples/0_Introduction/asyncAPI/.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "sample",
|
||||
"type": "shell",
|
||||
"command": "make dbg=1",
|
||||
"problemMatcher": ["$nvcc"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
341
Samples/0_Introduction/asyncAPI/Makefile
Normal file
341
Samples/0_Introduction/asyncAPI/Makefile
Normal file
|
@ -0,0 +1,341 @@
|
|||
################################################################################
|
||||
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
################################################################################
|
||||
#
|
||||
# Makefile project only supported on Mac OS X and Linux Platforms)
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Location of the CUDA Toolkit
|
||||
CUDA_PATH ?= /usr/local/cuda
|
||||
|
||||
##############################
|
||||
# start deprecated interface #
|
||||
##############################
|
||||
ifeq ($(x86_64),1)
|
||||
$(info WARNING - x86_64 variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=x86_64 instead)
|
||||
TARGET_ARCH ?= x86_64
|
||||
endif
|
||||
ifeq ($(ARMv7),1)
|
||||
$(info WARNING - ARMv7 variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=armv7l instead)
|
||||
TARGET_ARCH ?= armv7l
|
||||
endif
|
||||
ifeq ($(aarch64),1)
|
||||
$(info WARNING - aarch64 variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=aarch64 instead)
|
||||
TARGET_ARCH ?= aarch64
|
||||
endif
|
||||
ifeq ($(ppc64le),1)
|
||||
$(info WARNING - ppc64le variable has been deprecated)
|
||||
$(info WARNING - please use TARGET_ARCH=ppc64le instead)
|
||||
TARGET_ARCH ?= ppc64le
|
||||
endif
|
||||
ifneq ($(GCC),)
|
||||
$(info WARNING - GCC variable has been deprecated)
|
||||
$(info WARNING - please use HOST_COMPILER=$(GCC) instead)
|
||||
HOST_COMPILER ?= $(GCC)
|
||||
endif
|
||||
ifneq ($(abi),)
|
||||
$(error ERROR - abi variable has been removed)
|
||||
endif
|
||||
############################
|
||||
# end deprecated interface #
|
||||
############################
|
||||
|
||||
# architecture
|
||||
HOST_ARCH := $(shell uname -m)
|
||||
TARGET_ARCH ?= $(HOST_ARCH)
|
||||
ifneq (,$(filter $(TARGET_ARCH),x86_64 aarch64 sbsa ppc64le armv7l))
|
||||
ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifneq (,$(filter $(TARGET_ARCH),x86_64 aarch64 sbsa ppc64le))
|
||||
TARGET_SIZE := 64
|
||||
else ifneq (,$(filter $(TARGET_ARCH),armv7l))
|
||||
TARGET_SIZE := 32
|
||||
endif
|
||||
else
|
||||
TARGET_SIZE := $(shell getconf LONG_BIT)
|
||||
endif
|
||||
else
|
||||
$(error ERROR - unsupported value $(TARGET_ARCH) for TARGET_ARCH!)
|
||||
endif
|
||||
|
||||
# sbsa and aarch64 systems look similar. Need to differentiate them at host level for now.
|
||||
ifeq ($(HOST_ARCH),aarch64)
|
||||
ifeq ($(CUDA_PATH)/targets/sbsa-linux,$(shell ls -1d $(CUDA_PATH)/targets/sbsa-linux 2>/dev/null))
|
||||
HOST_ARCH := sbsa
|
||||
TARGET_ARCH := sbsa
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifeq (,$(filter $(HOST_ARCH)-$(TARGET_ARCH),aarch64-armv7l x86_64-armv7l x86_64-aarch64 x86_64-sbsa x86_64-ppc64le))
|
||||
$(error ERROR - cross compiling from $(HOST_ARCH) to $(TARGET_ARCH) is not supported!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# When on native aarch64 system with userspace of 32-bit, change TARGET_ARCH to armv7l
|
||||
ifeq ($(HOST_ARCH)-$(TARGET_ARCH)-$(TARGET_SIZE),aarch64-aarch64-32)
|
||||
TARGET_ARCH = armv7l
|
||||
endif
|
||||
|
||||
# operating system
|
||||
HOST_OS := $(shell uname -s 2>/dev/null | tr "[:upper:]" "[:lower:]")
|
||||
TARGET_OS ?= $(HOST_OS)
|
||||
ifeq (,$(filter $(TARGET_OS),linux darwin qnx android))
|
||||
$(error ERROR - unsupported value $(TARGET_OS) for TARGET_OS!)
|
||||
endif
|
||||
|
||||
# host compiler
|
||||
ifeq ($(TARGET_OS),darwin)
|
||||
ifeq ($(shell expr `xcodebuild -version | grep -i xcode | awk '{print $$2}' | cut -d'.' -f1` \>= 5),1)
|
||||
HOST_COMPILER ?= clang++
|
||||
endif
|
||||
else ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifeq ($(HOST_ARCH)-$(TARGET_ARCH),x86_64-armv7l)
|
||||
ifeq ($(TARGET_OS),linux)
|
||||
HOST_COMPILER ?= arm-linux-gnueabihf-g++
|
||||
else ifeq ($(TARGET_OS),qnx)
|
||||
ifeq ($(QNX_HOST),)
|
||||
$(error ERROR - QNX_HOST must be passed to the QNX host toolchain)
|
||||
endif
|
||||
ifeq ($(QNX_TARGET),)
|
||||
$(error ERROR - QNX_TARGET must be passed to the QNX target toolchain)
|
||||
endif
|
||||
export QNX_HOST
|
||||
export QNX_TARGET
|
||||
HOST_COMPILER ?= $(QNX_HOST)/usr/bin/arm-unknown-nto-qnx6.6.0eabi-g++
|
||||
else ifeq ($(TARGET_OS),android)
|
||||
HOST_COMPILER ?= arm-linux-androideabi-g++
|
||||
endif
|
||||
else ifeq ($(TARGET_ARCH),aarch64)
|
||||
ifeq ($(TARGET_OS), linux)
|
||||
HOST_COMPILER ?= aarch64-linux-gnu-g++
|
||||
else ifeq ($(TARGET_OS),qnx)
|
||||
ifeq ($(QNX_HOST),)
|
||||
$(error ERROR - QNX_HOST must be passed to the QNX host toolchain)
|
||||
endif
|
||||
ifeq ($(QNX_TARGET),)
|
||||
$(error ERROR - QNX_TARGET must be passed to the QNX target toolchain)
|
||||
endif
|
||||
export QNX_HOST
|
||||
export QNX_TARGET
|
||||
HOST_COMPILER ?= $(QNX_HOST)/usr/bin/q++
|
||||
else ifeq ($(TARGET_OS), android)
|
||||
HOST_COMPILER ?= aarch64-linux-android-clang++
|
||||
endif
|
||||
else ifeq ($(TARGET_ARCH),sbsa)
|
||||
HOST_COMPILER ?= aarch64-linux-gnu-g++
|
||||
else ifeq ($(TARGET_ARCH),ppc64le)
|
||||
HOST_COMPILER ?= powerpc64le-linux-gnu-g++
|
||||
endif
|
||||
endif
|
||||
HOST_COMPILER ?= g++
|
||||
NVCC := $(CUDA_PATH)/bin/nvcc -ccbin $(HOST_COMPILER)
|
||||
|
||||
# internal flags
|
||||
NVCCFLAGS := -m${TARGET_SIZE}
|
||||
CCFLAGS :=
|
||||
LDFLAGS :=
|
||||
|
||||
# build flags
|
||||
ifeq ($(TARGET_OS),darwin)
|
||||
LDFLAGS += -rpath $(CUDA_PATH)/lib
|
||||
CCFLAGS += -arch $(HOST_ARCH)
|
||||
else ifeq ($(HOST_ARCH)-$(TARGET_ARCH)-$(TARGET_OS),x86_64-armv7l-linux)
|
||||
LDFLAGS += --dynamic-linker=/lib/ld-linux-armhf.so.3
|
||||
CCFLAGS += -mfloat-abi=hard
|
||||
else ifeq ($(TARGET_OS),android)
|
||||
LDFLAGS += -pie
|
||||
CCFLAGS += -fpie -fpic -fexceptions
|
||||
endif
|
||||
|
||||
ifneq ($(TARGET_ARCH),$(HOST_ARCH))
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-linux)
|
||||
ifneq ($(TARGET_FS),)
|
||||
GCCVERSIONLTEQ46 := $(shell expr `$(HOST_COMPILER) -dumpversion` \<= 4.6)
|
||||
ifeq ($(GCCVERSIONLTEQ46),1)
|
||||
CCFLAGS += --sysroot=$(TARGET_FS)
|
||||
endif
|
||||
LDFLAGS += --sysroot=$(TARGET_FS)
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib/arm-linux-gnueabihf
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-linux)
|
||||
ifneq ($(TARGET_FS),)
|
||||
GCCVERSIONLTEQ46 := $(shell expr `$(HOST_COMPILER) -dumpversion` \<= 4.6)
|
||||
ifeq ($(GCCVERSIONLTEQ46),1)
|
||||
CCFLAGS += --sysroot=$(TARGET_FS)
|
||||
endif
|
||||
LDFLAGS += --sysroot=$(TARGET_FS)
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/lib -L$(TARGET_FS)/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/lib/aarch64-linux-gnu -L$(TARGET_FS)/lib/aarch64-linux-gnu
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib -L$(TARGET_FS)/usr/lib
|
||||
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib/aarch64-linux-gnu -L$(TARGET_FS)/usr/lib/aarch64-linux-gnu
|
||||
LDFLAGS += --unresolved-symbols=ignore-in-shared-libs
|
||||
CCFLAGS += -isystem=$(TARGET_FS)/usr/include -I$(TARGET_FS)/usr/include -I$(TARGET_FS)/usr/include/libdrm
|
||||
CCFLAGS += -isystem=$(TARGET_FS)/usr/include/aarch64-linux-gnu -I$(TARGET_FS)/usr/include/aarch64-linux-gnu
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-qnx)
|
||||
NVCCFLAGS += -D_QNX_SOURCE
|
||||
NVCCFLAGS += --qpp-config 8.3.0,gcc_ntoaarch64le
|
||||
CCFLAGS += -DWIN_INTERFACE_CUSTOM -I/usr/include/aarch64-qnx-gnu
|
||||
LDFLAGS += -lsocket
|
||||
LDFLAGS += -L/usr/lib/aarch64-qnx-gnu
|
||||
CCFLAGS += "-Wl\,-rpath-link\,/usr/lib/aarch64-qnx-gnu"
|
||||
ifdef TARGET_OVERRIDE
|
||||
LDFLAGS += -lslog2
|
||||
endif
|
||||
|
||||
ifneq ($(TARGET_FS),)
|
||||
LDFLAGS += -L$(TARGET_FS)/usr/lib
|
||||
CCFLAGS += "-Wl\,-rpath-link\,$(TARGET_FS)/usr/lib"
|
||||
LDFLAGS += -L$(TARGET_FS)/usr/libnvidia
|
||||
CCFLAGS += "-Wl\,-rpath-link\,$(TARGET_FS)/usr/libnvidia"
|
||||
CCFLAGS += -I$(TARGET_FS)/../include
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef TARGET_OVERRIDE # cuda toolkit targets override
|
||||
NVCCFLAGS += -target-dir $(TARGET_OVERRIDE)
|
||||
endif
|
||||
|
||||
# Install directory of different arch
|
||||
CUDA_INSTALL_TARGET_DIR :=
|
||||
ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-linux)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/armv7-linux-gnueabihf/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-linux)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/aarch64-linux/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),sbsa-linux)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/sbsa-linux/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-android)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/armv7-linux-androideabi/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-android)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/aarch64-linux-androideabi/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),armv7l-qnx)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/ARMv7-linux-QNX/
|
||||
else ifeq ($(TARGET_ARCH)-$(TARGET_OS),aarch64-qnx)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/aarch64-qnx/
|
||||
else ifeq ($(TARGET_ARCH),ppc64le)
|
||||
CUDA_INSTALL_TARGET_DIR = targets/ppc64le-linux/
|
||||
endif
|
||||
|
||||
# Debug build flags
|
||||
ifeq ($(dbg),1)
|
||||
NVCCFLAGS += -g -G
|
||||
BUILD_TYPE := debug
|
||||
else
|
||||
BUILD_TYPE := release
|
||||
endif
|
||||
|
||||
ALL_CCFLAGS :=
|
||||
ALL_CCFLAGS += $(NVCCFLAGS)
|
||||
ALL_CCFLAGS += $(EXTRA_NVCCFLAGS)
|
||||
ALL_CCFLAGS += $(addprefix -Xcompiler ,$(CCFLAGS))
|
||||
ALL_CCFLAGS += $(addprefix -Xcompiler ,$(EXTRA_CCFLAGS))
|
||||
|
||||
SAMPLE_ENABLED := 1
|
||||
|
||||
ALL_LDFLAGS :=
|
||||
ALL_LDFLAGS += $(ALL_CCFLAGS)
|
||||
ALL_LDFLAGS += $(addprefix -Xlinker ,$(LDFLAGS))
|
||||
ALL_LDFLAGS += $(addprefix -Xlinker ,$(EXTRA_LDFLAGS))
|
||||
|
||||
# Common includes and paths for CUDA
|
||||
INCLUDES := -I../../../Common
|
||||
LIBRARIES :=
|
||||
|
||||
################################################################################
|
||||
|
||||
# Gencode arguments
|
||||
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
|
||||
SMS ?= 53 61 70 72 75 80 86 87
|
||||
else
|
||||
SMS ?= 35 37 50 52 60 61 70 75 80 86
|
||||
endif
|
||||
|
||||
ifeq ($(SMS),)
|
||||
$(info >>> WARNING - no SM architectures have been specified - waiving sample <<<)
|
||||
SAMPLE_ENABLED := 0
|
||||
endif
|
||||
|
||||
ifeq ($(GENCODE_FLAGS),)
|
||||
# Generate SASS code for each SM architecture listed in $(SMS)
|
||||
$(foreach sm,$(SMS),$(eval GENCODE_FLAGS += -gencode arch=compute_$(sm),code=sm_$(sm)))
|
||||
|
||||
# Generate PTX code from the highest SM architecture in $(SMS) to guarantee forward-compatibility
|
||||
HIGHEST_SM := $(lastword $(sort $(SMS)))
|
||||
ifneq ($(HIGHEST_SM),)
|
||||
GENCODE_FLAGS += -gencode arch=compute_$(HIGHEST_SM),code=compute_$(HIGHEST_SM)
|
||||
endif
|
||||
endif
|
||||
|
||||
ALL_CCFLAGS += --threads 0 --std=c++11
|
||||
|
||||
ifeq ($(SAMPLE_ENABLED),0)
|
||||
EXEC ?= @echo "[@]"
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
# Target rules
|
||||
all: build
|
||||
|
||||
build: asyncAPI
|
||||
|
||||
check.deps:
|
||||
ifeq ($(SAMPLE_ENABLED),0)
|
||||
@echo "Sample will be waived due to the above missing dependencies"
|
||||
else
|
||||
@echo "Sample is ready - all dependencies have been met"
|
||||
endif
|
||||
|
||||
asyncAPI.o:asyncAPI.cu
|
||||
$(EXEC) $(NVCC) $(INCLUDES) $(ALL_CCFLAGS) $(GENCODE_FLAGS) -o $@ -c $<
|
||||
|
||||
asyncAPI: asyncAPI.o
|
||||
$(EXEC) $(NVCC) $(ALL_LDFLAGS) $(GENCODE_FLAGS) -o $@ $+ $(LIBRARIES)
|
||||
$(EXEC) mkdir -p ../../../bin/$(TARGET_ARCH)/$(TARGET_OS)/$(BUILD_TYPE)
|
||||
$(EXEC) cp $@ ../../../bin/$(TARGET_ARCH)/$(TARGET_OS)/$(BUILD_TYPE)
|
||||
|
||||
run: build
|
||||
$(EXEC) ./asyncAPI
|
||||
|
||||
testrun: build
|
||||
$(EXEC) ./asyncAPI --dummy-test-param
|
||||
|
||||
clean:
|
||||
rm -f asyncAPI asyncAPI.o
|
||||
rm -rf ../../../bin/$(TARGET_ARCH)/$(TARGET_OS)/$(BUILD_TYPE)/asyncAPI
|
||||
|
||||
clobber: clean
|
90
Samples/0_Introduction/asyncAPI/NsightEclipse.xml
Normal file
90
Samples/0_Introduction/asyncAPI/NsightEclipse.xml
Normal file
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE entry SYSTEM "SamplesInfo.dtd">
|
||||
<entry>
|
||||
<name>asyncAPI</name>
|
||||
<cuda_api_list>
|
||||
<toolkit>cudaMemset</toolkit>
|
||||
<toolkit>cudaFree</toolkit>
|
||||
<toolkit>cudaEventRecord</toolkit>
|
||||
<toolkit>cudaMallocHost</toolkit>
|
||||
<toolkit>cudaProfilerStart</toolkit>
|
||||
<toolkit>cudaEventCreate</toolkit>
|
||||
<toolkit>cudaEventElapsedTime</toolkit>
|
||||
<toolkit>cudaDeviceSynchronize</toolkit>
|
||||
<toolkit>cudaFreeHost</toolkit>
|
||||
<toolkit>cudaMalloc</toolkit>
|
||||
<toolkit>cudaEventQuery</toolkit>
|
||||
<toolkit>cudaProfilerStop</toolkit>
|
||||
<toolkit>cudaEventDestroy</toolkit>
|
||||
<toolkit>cudaMemcpyAsync</toolkit>
|
||||
<toolkit>cudaGetDeviceProperties</toolkit>
|
||||
</cuda_api_list>
|
||||
<description><![CDATA[This sample illustrates the usage of CUDA events for both GPU timing and overlapping CPU and GPU execution. Events are inserted into a stream of CUDA calls. Since CUDA stream calls are asynchronous, the CPU can perform computations while GPU is executing (including DMA memcopies between the host and device). CPU can query CUDA events to determine whether GPU has completed tasks.]]></description>
|
||||
<devicecompilation>whole</devicecompilation>
|
||||
<includepaths>
|
||||
<path>./</path>
|
||||
<path>../</path>
|
||||
<path>../../../Common</path>
|
||||
</includepaths>
|
||||
<keyconcepts>
|
||||
<concept level="basic">Asynchronous Data Transfers</concept>
|
||||
<concept level="basic">CUDA Streams and Events</concept>
|
||||
</keyconcepts>
|
||||
<keywords>
|
||||
<keyword>GPGPU</keyword>
|
||||
</keywords>
|
||||
<libraries>
|
||||
</libraries>
|
||||
<librarypaths>
|
||||
</librarypaths>
|
||||
<nsight_eclipse>true</nsight_eclipse>
|
||||
<primary_file>asyncAPI.cu</primary_file>
|
||||
<qatests>
|
||||
<qatest>--dummy-test-param</qatest>
|
||||
</qatests>
|
||||
<scopes>
|
||||
<scope>1:CUDA Basic Topics</scope>
|
||||
<scope>1:Performance Strategies</scope>
|
||||
</scopes>
|
||||
<sm-arch>sm35</sm-arch>
|
||||
<sm-arch>sm37</sm-arch>
|
||||
<sm-arch>sm50</sm-arch>
|
||||
<sm-arch>sm52</sm-arch>
|
||||
<sm-arch>sm53</sm-arch>
|
||||
<sm-arch>sm60</sm-arch>
|
||||
<sm-arch>sm61</sm-arch>
|
||||
<sm-arch>sm70</sm-arch>
|
||||
<sm-arch>sm72</sm-arch>
|
||||
<sm-arch>sm75</sm-arch>
|
||||
<sm-arch>sm80</sm-arch>
|
||||
<sm-arch>sm86</sm-arch>
|
||||
<sm-arch>sm87</sm-arch>
|
||||
<supported_envs>
|
||||
<env>
|
||||
<arch>x86_64</arch>
|
||||
<platform>linux</platform>
|
||||
</env>
|
||||
<env>
|
||||
<platform>windows7</platform>
|
||||
</env>
|
||||
<env>
|
||||
<arch>x86_64</arch>
|
||||
<platform>macosx</platform>
|
||||
</env>
|
||||
<env>
|
||||
<arch>arm</arch>
|
||||
</env>
|
||||
<env>
|
||||
<arch>sbsa</arch>
|
||||
</env>
|
||||
<env>
|
||||
<arch>ppc64le</arch>
|
||||
<platform>linux</platform>
|
||||
</env>
|
||||
</supported_envs>
|
||||
<supported_sm_architectures>
|
||||
<include>all</include>
|
||||
</supported_sm_architectures>
|
||||
<title>asyncAPI</title>
|
||||
<type>exe</type>
|
||||
</entry>
|
70
Samples/0_Introduction/asyncAPI/README.md
Normal file
70
Samples/0_Introduction/asyncAPI/README.md
Normal file
|
@ -0,0 +1,70 @@
|
|||
# asyncAPI - asyncAPI
|
||||
|
||||
## Description
|
||||
|
||||
This sample illustrates the usage of CUDA events for both GPU timing and overlapping CPU and GPU execution. Events are inserted into a stream of CUDA calls. Since CUDA stream calls are asynchronous, the CPU can perform computations while GPU is executing (including DMA memcopies between the host and device). CPU can query CUDA events to determine whether GPU has completed tasks.
|
||||
|
||||
## Key Concepts
|
||||
|
||||
Asynchronous Data Transfers, CUDA Streams and Events
|
||||
|
||||
## Supported SM Architectures
|
||||
|
||||
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus)
|
||||
|
||||
## Supported OSes
|
||||
|
||||
Linux, Windows
|
||||
|
||||
## Supported CPU Architecture
|
||||
|
||||
x86_64, ppc64le, armv7l
|
||||
|
||||
## CUDA APIs involved
|
||||
|
||||
### [CUDA Runtime API](http://docs.nvidia.com/cuda/cuda-runtime-api/index.html)
|
||||
cudaMemset, cudaFree, cudaEventRecord, cudaMallocHost, cudaProfilerStart, cudaEventCreate, cudaEventElapsedTime, cudaDeviceSynchronize, cudaFreeHost, cudaMalloc, cudaEventQuery, cudaProfilerStop, cudaEventDestroy, cudaMemcpyAsync, cudaGetDeviceProperties
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Download and install the [CUDA Toolkit 11.6](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
|
||||
|
||||
## Build and Run
|
||||
|
||||
### Windows
|
||||
The Windows samples are built using the Visual Studio IDE. Solution files (.sln) are provided for each supported version of Visual Studio, using the format:
|
||||
```
|
||||
*_vs<version>.sln - for Visual Studio <version>
|
||||
```
|
||||
Each individual sample has its own set of solution files in its directory:
|
||||
|
||||
To build/examine all the samples at once, the complete solution files should be used. To build/examine a single sample, the individual sample solution files should be used.
|
||||
> **Note:** Some samples require that the Microsoft DirectX SDK (June 2010 or newer) be installed and that the VC++ directory paths are properly set up (**Tools > Options...**). Check DirectX Dependencies section for details."
|
||||
|
||||
### Linux
|
||||
The Linux samples are built using makefiles. To use the makefiles, change the current directory to the sample directory you wish to build, and run make:
|
||||
```
|
||||
$ cd <sample_dir>
|
||||
$ make
|
||||
```
|
||||
The samples makefiles can take advantage of certain options:
|
||||
* **TARGET_ARCH=<arch>** - cross-compile targeting a specific architecture. Allowed architectures are x86_64, ppc64le, armv7l.
|
||||
By default, TARGET_ARCH is set to HOST_ARCH. On a x86_64 machine, not setting TARGET_ARCH is the equivalent of setting TARGET_ARCH=x86_64.<br/>
|
||||
`$ make TARGET_ARCH=x86_64` <br/> `$ make TARGET_ARCH=ppc64le` <br/> `$ make TARGET_ARCH=armv7l` <br/>
|
||||
See [here](http://docs.nvidia.com/cuda/cuda-samples/index.html#cross-samples) for more details.
|
||||
* **dbg=1** - build with debug symbols
|
||||
```
|
||||
$ make dbg=1
|
||||
```
|
||||
* **SMS="A B ..."** - override the SM architectures for which the sample will be built, where `"A B ..."` is a space-delimited list of SM architectures. For example, to generate SASS for SM 50 and SM 60, use `SMS="50 60"`.
|
||||
```
|
||||
$ make SMS="50 60"
|
||||
```
|
||||
|
||||
* **HOST_COMPILER=<host_compiler>** - override the default g++ host compiler. See the [Linux Installation Guide](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements) for a list of supported host compilers.
|
||||
```
|
||||
$ make HOST_COMPILER=g++
|
||||
```
|
||||
|
||||
## References (for more details)
|
||||
|
142
Samples/0_Introduction/asyncAPI/asyncAPI.cu
Normal file
142
Samples/0_Introduction/asyncAPI/asyncAPI.cu
Normal file
|
@ -0,0 +1,142 @@
|
|||
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This sample illustrates the usage of CUDA events for both GPU timing and
|
||||
* overlapping CPU and GPU execution. Events are inserted into a stream
|
||||
* of CUDA calls. Since CUDA stream calls are asynchronous, the CPU can
|
||||
* perform computations while GPU is executing (including DMA memcopies
|
||||
* between the host and device). CPU can query CUDA events to determine
|
||||
* whether GPU has completed tasks.
|
||||
*/
|
||||
|
||||
// includes, system
|
||||
#include <stdio.h>
|
||||
|
||||
// includes CUDA Runtime
|
||||
#include <cuda_runtime.h>
|
||||
#include <cuda_profiler_api.h>
|
||||
|
||||
// includes, project
|
||||
#include <helper_cuda.h>
|
||||
#include <helper_functions.h> // helper utility functions
|
||||
|
||||
__global__ void increment_kernel(int *g_data, int inc_value) {
|
||||
int idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
g_data[idx] = g_data[idx] + inc_value;
|
||||
}
|
||||
|
||||
bool correct_output(int *data, const int n, const int x) {
|
||||
for (int i = 0; i < n; i++)
|
||||
if (data[i] != x) {
|
||||
printf("Error! data[%d] = %d, ref = %d\n", i, data[i], x);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int devID;
|
||||
cudaDeviceProp deviceProps;
|
||||
|
||||
printf("[%s] - Starting...\n", argv[0]);
|
||||
|
||||
// This will pick the best possible CUDA capable device
|
||||
devID = findCudaDevice(argc, (const char **)argv);
|
||||
|
||||
// get device name
|
||||
checkCudaErrors(cudaGetDeviceProperties(&deviceProps, devID));
|
||||
printf("CUDA device [%s]\n", deviceProps.name);
|
||||
|
||||
int n = 16 * 1024 * 1024;
|
||||
int nbytes = n * sizeof(int);
|
||||
int value = 26;
|
||||
|
||||
// allocate host memory
|
||||
int *a = 0;
|
||||
checkCudaErrors(cudaMallocHost((void **)&a, nbytes));
|
||||
memset(a, 0, nbytes);
|
||||
|
||||
// allocate device memory
|
||||
int *d_a = 0;
|
||||
checkCudaErrors(cudaMalloc((void **)&d_a, nbytes));
|
||||
checkCudaErrors(cudaMemset(d_a, 255, nbytes));
|
||||
|
||||
// set kernel launch configuration
|
||||
dim3 threads = dim3(512, 1);
|
||||
dim3 blocks = dim3(n / threads.x, 1);
|
||||
|
||||
// create cuda event handles
|
||||
cudaEvent_t start, stop;
|
||||
checkCudaErrors(cudaEventCreate(&start));
|
||||
checkCudaErrors(cudaEventCreate(&stop));
|
||||
|
||||
StopWatchInterface *timer = NULL;
|
||||
sdkCreateTimer(&timer);
|
||||
sdkResetTimer(&timer);
|
||||
|
||||
checkCudaErrors(cudaDeviceSynchronize());
|
||||
float gpu_time = 0.0f;
|
||||
|
||||
// asynchronously issue work to the GPU (all to stream 0)
|
||||
checkCudaErrors(cudaProfilerStart());
|
||||
sdkStartTimer(&timer);
|
||||
cudaEventRecord(start, 0);
|
||||
cudaMemcpyAsync(d_a, a, nbytes, cudaMemcpyHostToDevice, 0);
|
||||
increment_kernel<<<blocks, threads, 0, 0>>>(d_a, value);
|
||||
cudaMemcpyAsync(a, d_a, nbytes, cudaMemcpyDeviceToHost, 0);
|
||||
cudaEventRecord(stop, 0);
|
||||
sdkStopTimer(&timer);
|
||||
checkCudaErrors(cudaProfilerStop());
|
||||
|
||||
// have CPU do some work while waiting for stage 1 to finish
|
||||
unsigned long int counter = 0;
|
||||
|
||||
while (cudaEventQuery(stop) == cudaErrorNotReady) {
|
||||
counter++;
|
||||
}
|
||||
|
||||
checkCudaErrors(cudaEventElapsedTime(&gpu_time, start, stop));
|
||||
|
||||
// print the cpu and gpu times
|
||||
printf("time spent executing by the GPU: %.2f\n", gpu_time);
|
||||
printf("time spent by CPU in CUDA calls: %.2f\n", sdkGetTimerValue(&timer));
|
||||
printf("CPU executed %lu iterations while waiting for GPU to finish\n",
|
||||
counter);
|
||||
|
||||
// check the output for correctness
|
||||
bool bFinalResults = correct_output(a, n, value);
|
||||
|
||||
// release resources
|
||||
checkCudaErrors(cudaEventDestroy(start));
|
||||
checkCudaErrors(cudaEventDestroy(stop));
|
||||
checkCudaErrors(cudaFreeHost(a));
|
||||
checkCudaErrors(cudaFree(d_a));
|
||||
|
||||
exit(bFinalResults ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
20
Samples/0_Introduction/asyncAPI/asyncAPI_vs2017.sln
Normal file
20
Samples/0_Introduction/asyncAPI/asyncAPI_vs2017.sln
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2017
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asyncAPI", "asyncAPI_vs2017.vcxproj", "{997E0757-EA74-4A4E-A0FC-47D8C8831A15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.Build.0 = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.ActiveCfg = Release|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
112
Samples/0_Introduction/asyncAPI/asyncAPI_vs2017.vcxproj
Normal file
112
Samples/0_Introduction/asyncAPI/asyncAPI_vs2017.vcxproj
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CUDAPropsPath Condition="'$(CUDAPropsPath)'==''">$(VCTargetsPath)\BuildCustomizations</CUDAPropsPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{997E0757-EA74-4A4E-A0FC-47D8C8831A15}</ProjectGuid>
|
||||
<RootNamespace>asyncAPI_vs2017</RootNamespace>
|
||||
<ProjectName>asyncAPI</ProjectName>
|
||||
<CudaToolkitCustomDir />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'==''">
|
||||
<LatestTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</LatestTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
<TargetPlatformVersion>$(WindowsTargetPlatformVersion)</TargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IntDir>$(Platform)/$(Configuration)/</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules />
|
||||
<CodeAnalysisRuleAssemblies />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<OutDir>../../../bin/win64/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./;$(CudaToolkitDir)/include;../../../Common;</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(CudaToolkitLibDir);</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)/asyncAPI.exe</OutputFile>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;</CodeGeneration>
|
||||
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
|
||||
<Include>./;../../../Common</Include>
|
||||
<Defines>WIN32</Defines>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MTd</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MT</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="asyncAPI.cu" />
|
||||
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
20
Samples/0_Introduction/asyncAPI/asyncAPI_vs2019.sln
Normal file
20
Samples/0_Introduction/asyncAPI/asyncAPI_vs2019.sln
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2019
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asyncAPI", "asyncAPI_vs2019.vcxproj", "{997E0757-EA74-4A4E-A0FC-47D8C8831A15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.Build.0 = Debug|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.ActiveCfg = Release|x64
|
||||
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
108
Samples/0_Introduction/asyncAPI/asyncAPI_vs2019.vcxproj
Normal file
108
Samples/0_Introduction/asyncAPI/asyncAPI_vs2019.vcxproj
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CUDAPropsPath Condition="'$(CUDAPropsPath)'==''">$(VCTargetsPath)\BuildCustomizations</CUDAPropsPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{997E0757-EA74-4A4E-A0FC-47D8C8831A15}</ProjectGuid>
|
||||
<RootNamespace>asyncAPI_vs2019</RootNamespace>
|
||||
<ProjectName>asyncAPI</ProjectName>
|
||||
<CudaToolkitCustomDir />
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IntDir>$(Platform)/$(Configuration)/</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules />
|
||||
<CodeAnalysisRuleAssemblies />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<OutDir>../../../bin/win64/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./;$(CudaToolkitDir)/include;../../../Common;</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(CudaToolkitLibDir);</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)/asyncAPI.exe</OutputFile>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;</CodeGeneration>
|
||||
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
|
||||
<Include>./;../../../Common</Include>
|
||||
<Defines>WIN32</Defines>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MTd</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CudaCompile>
|
||||
<Runtime>MT</Runtime>
|
||||
<TargetMachinePlatform>64</TargetMachinePlatform>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="asyncAPI.cu" />
|
||||
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(CUDAPropsPath)\CUDA 11.6.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user