English 中文(简体)
主旨胜利:“筹集大量资源,用于发射”
原标题:thrust functor: "too many resources requested for launch"
  • 时间:2012-04-11 08:27:57
  •  标签:
  • cuda
  • thrust

我试图在《世界人权宣言》中执行这样的内容:

每一要素

p = { p if p >= floor
      z if p < floor

Where floor and z are constants configured at the start of the test.

我曾尝试像这样加以执行,但我发现的错误是“要求发射的很多资源”。

A functor:

struct floor_functor : thrust::unary_function <float, float>
{
        const float floorLevel, floorVal;

        floor_functor(float _floorLevel, float _floorVal) : floorLevel(_floorLevel), floorVal(_floorVal){}

        __host__
        __device__
        float operator()(float& x) const
        {
            if (x >= floorLevel)
                return x;
            else
                return floorVal;
        }
};

变革使用:

thrust::transform(input->begin(), input->end(), output.begin(), floor_functor(floorLevel, floorVal));

如果我去掉我的一位校长,即<代码>海底,并且只使用一位成员变量的校长,则该校将进行罚款。

是否有任何人知道这样做的原因,以及我如何确定这一点?

http://www.ohchr.org。

我的阵列长期以来是786432个因素。

My GPU is a GeForce GTX590

我是在指挥下建造的:

`nvcc -c -g -arch sm_11 -Xcompiler -fPIC -Xcompiler -Wall -DTHRUST_DEBUG  -I <my_include_dir> -o <my_output> <my_source>`

我的 c版是4.0:

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2011 NVIDIA Corporation
Built on Thu_May_12_11:09:45_PDT_2011
Cuda compilation tools, release 4.0, V0.2.1221

而我每个区的最大校对人数是1024(用装置质量报告):

Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per block:           1024
  Maximum sizes of each dimension of a block:    1024 x 1024 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 65535

www.un.org/french/ga/president

我为我的问题 st倒了一步,但并不理解。 如果我从“底线——functor”中把我的遗体重新命名为基本的东西,那么它就会发挥作用! 我有“no>/em>的想法,这就是为什么如此,并有兴趣听取任何人对此的看法。

问题回答

为了便于执行《世界人权宣言》,你可以在一条法典中与ArrayFire一道这样做:

p(p < floor) = z;

仅宣布你们的变量为:

亲爱!

申斥: 我从事各种项目,包括ArrayFire。





相关问题
Why won t OpenCV compile in NVCC?

I am trying to integrate CUDA and openCV in a project. Problem is openCV won t compile when NVCC is used, while a normal c++ project compiles just fine. This seems odd to me, as I thought NVCC ...

error in CUDA compilation

I m getting this error while trying to run sample codes in CUDA SDK. I have CUDA 2.3 and Visual studio 2008 LINK : fatal error LNK1181: cannot open input file cutil32D.lib Any pointers how to ...

CUDA Memory Allocation accessible for both host and device

I m trying to figure out a way to allocate a block of memory that is accessible by both the host (CPU) and device (GPU). Other than using cudaHostAlloc() function to allocate page-locked memory that ...

热门标签