FAQ Database Discussion Community


Do GHC REWRITE pragmas have to be type preserving?

haskell,ghc,pragma
import Data.Void (Void,absurd) Say I have a small term language: data Term c v where Var :: v -> Term c v Con :: c -> [Term c v] -> Term c v If I want to combine terms of the type Term c Void and Term c Int, that...

Labeling data for Bag Of Words

c++,opencv,openmp,pragma,labeling
I've been looking at this tutorial and the labeling part confuses me. Not the act of labeling itself, but the way the process is shown in the tutorial. More specifically the #pragma omp sections: #pragma omp parallel for schedule(dynamic,3) for(..loop a directory?..) { ... #pragma omp critical { if(classes_training_data.count(class_) ==...

find code causing warning 4503 in VC++

c++,debugging,visual-studio-2012,warnings,pragma
I'm trying to track down the source of this large warning in a big code base: C:\Program Files (x86)\Microsoft Visual Studio 12.\VC\INCLUDE\xmemory0(592) : warning C4503: 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::_Insert_at' : decorated name length exceeded, name was truncated with [ _Kty=epmem_node_id, _Ty=std::map<std::string,std::list<std::string,std::allocator<std::string>>,std::less<std::string>,std::allocator<std::pair<const...

Parallel for loop with reduction and manipulating arrays

c,for-loop,openmp,pragma
I'm new to openMP and I try to optimize for loop. The result is not as expected, the for loops are not working correctly (due to dependency). I don't understand how to get a perfect parallel loop with the examples below : #pragma omp parallel for default(shared) reduction(+...) for(i =...

Does OMP Pragmas nesting have significance?

openmp,pragma
I'm looking at some code like below (in a reviewer/auditor capacity). The nesting shown below was created with TABS in the source code. #pragma omp parallel #pragma omp sections { #pragma omp section p2 = ModularExponentiation((a % p), dp, p); #pragma omp section q2 = ModularExponentiation((a % q), dq, q);...

How to hide extra output from #pragma message

gcc,c-preprocessor,pragma
I'm currently porting some code to a new platform and toolchain, which includes an upgrade from gcc 4.7.2 to gcc 4.9.2 (or more specifically, from release 2012 to 2014 of the OSELAS toolchains - I've also reproduced the behavior on my host machine with gcc 4.6.4 (works) and gcc 4.8.3...