我可以在 OpenACC 中使用 std::bitset 的函数吗?

Can I use std::bitset's functions with OpenACC?

是否可以在OpenACC区域使用bitset的功能? 示例代码:

#include <string.h>
#include <bitset>

#pragma acc routine seq
int mystrcmp (const char *, const char *);
int main(int argc, char** argv)
{
    long sum = 3, i;
    std::bitset<11> vv;
    char *str;
    char *str2;

    #pragma acc parallel loop reduction(+:sum)
    for(i = 0; i<5000000000; ++i)
    {   
        sum +=i%2;
        if(i == 1){
            mystrcmp(str, str2);
            vv.count();
        }
    }
    return 0;
}
int mystrcmp (const char *s1, const char *s2) {...}

如果我用 pgc++ -fast -acc -Minfo=accel -ta=nvidia:managed -DNDEBUG -pgc++libs -g 和类似的代码 (LD_LIBRARY_PATH=/opt/pgi/linux86-64/lib) 编译上面的代码,我会得到以下错误:PGCC-S-0155-PGI support procedure called within a compute region: __blt_pgi_popcountl (proba2.cpp: 1288) PGCC-S-0155-Accelerator region ignored; see -Minfo messages (proba2.cpp: 28) main: 28, Accelerator region ignored 1288, Accelerator restriction: unsupported call to support routine '__blt_pgi_popcountl' PGCC/x86 Linux 16.10-0: compilation completed with severe errors,但代码包含行数比 1288 少得多。
我使用 mystrcmp,因为内置的 strcmp 需要 routine seq,但据我所知,这是不可能解决的。
但是,如果vv.count()被注释掉,那么编译就成功了。
我看了很多关于OpenACC和OpenACC的问题,但是没有找到对应的回复这个问题。
我该怎么办?

不,抱歉,我们 (PGI) 尚未添加对 "std::bitset" 例程的运行时支持。由于这是我看到的第一个功能请求,我提交了一个新的 RFE (TPR#23746) 并将其发送给我们的编译器工程师,看看我们能做些什么。