error: expression must have integral or enum type

Elliot Gorokhovsky

In CUDA C, why does the following code

findMinMax<<sizeof(lum)/1024,1024>>(lum,&min_logLum,&max_logLum);

give this error?

error: expression must have integral or enum type
void_ptr

You need to use triple angled brackets as part of kernel launch syntax:

findMinMax<<<sizeof(lum)/1024,1024>>>(lum,&min_logLum,&max_logLum);

That should resolve compilation error, provided the rest is correct (e.g., the set of arguments matches the kernel prototype).

Note that a few other things are suspicious in the way you launch the kernel:

  • You round the number of blocks per grid down instead of up. For example, if sizeof(lum) evaluates to 1500, you still launch only 1 block of 1024 threads. This may not be what you intend to do.

  • You pass host pointers &min_logLum and &max_logLum to the kernel, which, again, may be not what you intend to do here, however it is hard to tell without seeing the rest of your code.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Expression must have a pointer to object type in C

来自分类Dev

C , Error: Expression must be a modifiable lvalue

来自分类Dev

transitionFromViewController:toViewController error: children view controllers must have a common parent view controller

来自分类Dev

switch over value of enum: case expressions must be constant expressions

来自分类Dev

在Scala中将Java Enum用作Type参数

来自分类Dev

使用Type动态返回null的Enum

来自分类Dev

在Scala中将Java Enum用作Type参数

来自分类Dev

Expression.Call,Int32和Enum

来自分类Dev

Expression.Call,Int32和Enum

来自分类Dev

How to accept after at sign must have letter with below regex

来自分类Dev

lmer error: grouping factor must be < number of observations

来自分类Dev

Tensorflow error: Invalid argument: shape must be a vector

来自分类Dev

parameter name omitted error for function returning enum

来自分类Dev

ActiveRecord::StatementInvalid: PG::Error: ERROR: must be owner of database

来自分类Dev

Is it alright to have a field type of ObjectId in a mongoose schema

来自分类Dev

c++ how to have same enum members name in different enum names without getting err:redefinition; previous definition was 'enumerator'

来自分类Dev

Integral Function in R

来自分类Dev

Fatal error: Cannot use isset() on the result of an expression

来自分类Dev

Webpack 抛出 TypeError: Super expression must be null or a function, not undefined 导入 LESS 文件时

来自分类Dev

import React, {PropTypes} from 'react' 导致 Uncaught TypeError: Super expression must be null or a function, not undefined

来自分类Dev

使用包含int列表的enum属性的contains方法构建LINQ Lambda Expression

来自分类Dev

用enum上的case或expression切换大小写的结果不符合预期

来自分类Dev

Index and length must refer to a location within the string error in substring

来自分类Dev

Yii2 SluggableBehavior "attribute" or "value" property must be specified error

来自分类Dev

Regular expression *this close*, but still missing one type of symbol

来自分类Dev

Why every constant expression can be cast to enumeration type

来自分类Dev

Python Decimal type precision error

来自分类Dev

PureScript Type Error很难理解

来自分类Dev

在 Python 中计算 Integral 的问题

Related 相关文章

  1. 1

    Expression must have a pointer to object type in C

  2. 2

    C , Error: Expression must be a modifiable lvalue

  3. 3

    transitionFromViewController:toViewController error: children view controllers must have a common parent view controller

  4. 4

    switch over value of enum: case expressions must be constant expressions

  5. 5

    在Scala中将Java Enum用作Type参数

  6. 6

    使用Type动态返回null的Enum

  7. 7

    在Scala中将Java Enum用作Type参数

  8. 8

    Expression.Call,Int32和Enum

  9. 9

    Expression.Call,Int32和Enum

  10. 10

    How to accept after at sign must have letter with below regex

  11. 11

    lmer error: grouping factor must be < number of observations

  12. 12

    Tensorflow error: Invalid argument: shape must be a vector

  13. 13

    parameter name omitted error for function returning enum

  14. 14

    ActiveRecord::StatementInvalid: PG::Error: ERROR: must be owner of database

  15. 15

    Is it alright to have a field type of ObjectId in a mongoose schema

  16. 16

    c++ how to have same enum members name in different enum names without getting err:redefinition; previous definition was 'enumerator'

  17. 17

    Integral Function in R

  18. 18

    Fatal error: Cannot use isset() on the result of an expression

  19. 19

    Webpack 抛出 TypeError: Super expression must be null or a function, not undefined 导入 LESS 文件时

  20. 20

    import React, {PropTypes} from 'react' 导致 Uncaught TypeError: Super expression must be null or a function, not undefined

  21. 21

    使用包含int列表的enum属性的contains方法构建LINQ Lambda Expression

  22. 22

    用enum上的case或expression切换大小写的结果不符合预期

  23. 23

    Index and length must refer to a location within the string error in substring

  24. 24

    Yii2 SluggableBehavior "attribute" or "value" property must be specified error

  25. 25

    Regular expression *this close*, but still missing one type of symbol

  26. 26

    Why every constant expression can be cast to enumeration type

  27. 27

    Python Decimal type precision error

  28. 28

    PureScript Type Error很难理解

  29. 29

    在 Python 中计算 Integral 的问题

热门标签

归档