thread_block未定义

今天我在研究不同的block的线程如何同步的问题,在参考文件中提示使用:
出处:https://devblogs.nvidia.com/cooperative-groups/
thread_block block = this_thread_block();
可是在编译器中填写但是出现错误
Description Resource Path Location Type
identifier “thread_block” is undefined deviceGpu.cu /cudaDBN/src line 83 C/C++ Problem
这是为什么,我少添加了头文件还是需要配置环境?

yes you need to include a header file

In the blog you linked, please read it. Look for the very first include statement listed in that blog.

Or study any CUDA sample code.

Also note that the synchronization of blocks in cooperative groups will require specific GPU and system characteristics, as well as specific compile options.

编译器用的Nsight Eclipse 头文件#include <cooperative_groups.h>已经包含.GPU是gtx980.系统为Ubuntu18.10任然出错.难道是Nsight需要配置吗?

study a CUDA sample code project that uses cooperative groups

you can import it as a makefile project into nsight eclipse if you wish

GTX 980 cannot do inter-block synchronization via grid.sync() in cooperative groups.