首页 \ 问答 \ 针对不同CUDA版本的不同构建规则?(Different build rules for different CUDA versions?)

针对不同CUDA版本的不同构建规则?(Different build rules for different CUDA versions?)

我想在我的cuda代码中指定我是使用CUDA构建规则版本4.2还是使用CUDA构建规则版本5进行编译。

是否有任何用于此类提议的宏?

注意:我知道有一个选项可以指定当前编译过程是否支持某种体系结构,例如__CUDA_ARCH__

我正在为cuda构建规则版本寻找类似的宏

非常感谢帮助


I'd like to specify in my cuda code whether I'm compiling using CUDA build rule version 4.2 or CUDA build rule version 5.

is there any macro used for such propose ?

Note: I know there is an option to specify whether current compilation process support certain architecture, e.g __CUDA_ARCH__

I'm looking for a similar macro for cuda build rule version

Help is very appreciated


原文:
更新时间:2022-01-25 20:01

最满意答案

根据http://www.w3.org/TR/css3-mediaqueries/ ,自HTML4和CSS2以来,支持在CSS文件中使用@media ...

“'print'和'screen'媒体类型在HTML4中定义.HTML4中媒体类型的完整列表是:'aural','braille','掌上','print','projection','screen', 'tty','tv'.CSS2定义相同的列表,弃用'aural'并添加'embossed'和'speech'。此外,'all'用于表示样式表适用于所有媒体类型。“

CSS3扩展了@media ...的使用,也允许使用媒体查询,这些也记录在我之前链接的w3.org页面上。

此处还记录了媒体类型的用法:

http://www.w3schools.com/css/css_mediatypes.asp

以下是媒体查询支持列表:

http://www.javascriptkit.com/dhtmltutors/cssmediaqueries.shtml

据我所知; @media screen, print, ...受到广泛支持,但是您可以使用的新媒体查询仅在兼容CSS3的浏览器中受支持。

编辑:这里有更多关于此的信息:

http://www.w3.org/TR/CSS2/media.html#x2

我不担心支持使用@media ...这样。


According to http://www.w3.org/TR/css3-mediaqueries/ the use of @media ... in CSS files has been supported since HTML4 and CSS2.

"The ‘print’ and ‘screen’ media types are defined in HTML4. The complete list of media types in HTML4 is: ‘aural’, ‘braille’, ‘handheld’, ‘print’, ‘projection’, ‘screen’, ‘tty’, ‘tv’. CSS2 defines the same list, deprecates ‘aural’ and adds ‘embossed’ and ‘speech’. Also, ‘all’ is used to indicate that the style sheet applies to all media types."

CSS3 expanded the use of @media ... to also allow media queries to be used, these are also documented on the w3.org page I linked earlier.

Usage of media types is also documented here:

http://www.w3schools.com/css/css_mediatypes.asp

Here is a list of support for media queries:

http://www.javascriptkit.com/dhtmltutors/cssmediaqueries.shtml

As far as I can tell; use of @media screen, print, ... is very widely supported, however the newer media queries that you can use are only supported in CSS3 compatible browsers.

Edit: There is even more info about this here:

http://www.w3.org/TR/CSS2/media.html#x2

I wouldn't worry about support for using @media ... this way.

相关问答

更多