ROCm / hcc

HCC is an Open Source, Optimizing C++ Compiler for Heterogeneous Compute currently for the ROCm GPU Computing Platform
https://github.com/RadeonOpenCompute/hcc/wiki
Other
430 stars 107 forks source link

clamp-config (C++ AMP) and -std=c++11 #557

Open smithakihide opened 6 years ago

smithakihide commented 6 years ago

hello. I would be glad if someone help me.

I'd like to use the experimental library of C++. so I have to set the option -std=c++11 when I compile my code with hcc. but when I set clamp-config and -std=c++11 simultaneously, I cannot get a correct result.

here is a sample code although what I want to do is more complex.

#include <iostream>
#include <experimental/filesystem>
#include <amp.h>

int  main()
{
        std::cout << "hello\n";
        return 0;
}

and here are the ones of the outputs.

/usr/local/bin/../include/kalmar_index.h:42:35: error: expected ';' at end of declaration list
    explicit __index_leaf(int __t) restrict(amp,cpu) : __idx(__t) {}
                                  ^
/usr/local/bin/../include/kalmar_index.h:76:17: error: expected ';' at end of declaration list
    index_impl() restrict(amp,cpu) : __index_leaf<N>(0)... {}
                ^

I want to use C++ AMP mode to resume the compatibility with Windows environment and OpenCL back ground. although I would be more happy if Microsoft supported hcc and the implementation of ROCm hcc would get to be compatible with OpenCL back end.

I think I can use the full feature of C++ 11 in my code with clamp-config option. but when I set -std=c++11, I get not to be able to compile anymore. this is strange behavior.

Especially, I want to use filesystem library. only such these experimental libraries suffer from this problem.

help me please or please improve this.

smithakihide commented 6 years ago

may be, I should give up to use filesystem libraries,