Get managed informations using unmanaged code
I'm developing a simple compiler for .Net, in C++, but am having problems with my include system, therefore not seem to find a way to recognize what kind of method I'm calling from dll if it is void ,...
View ArticleUI thread and task_continuation_context::use_current()
Looks like in nested .then task_continuation_context::use_current() actually does not point to UI thread.Any way to explicitly specify the UI thread?Or what is the right way to do this...
View ArticleParallel For loop and progress bar in c++
Hi,I have an MFC based progress bar that get updated in a for loop. I'm changing the loop for doing the work to a parallel for loop and was wondering how the progress bar should be updated now that I'm...
View ArticleOptimized AMP code output different from non-optimized
Hello eveyone,I have uploaded my project on my SkyDrive public folder here. Note that it isn't anything serious, I just practiced working with C++ AMP using this project while I was busy reading the...
View ArticleRight way (&simple) to do thread-safe access to variable from multiple...
What is the best practice for thread-safe access to variable in WinRT.Let say I have 100 threads that upon completion each increments one and the same counter (sure it's very simple example that can be...
View ArticleHeap Corruption while calling c++ Dll from VB Com+ Application
Hi, I'm Getting Heap Corruption while calling C++ Dll from VB Com+ application in window 2008 R2 Server. I'm calling below function from COM+ application. Com+ Activation Type is set as Server...
View ArticleAbout error LNK 2019 : unresolved external symbol when import the my static...
Below is the error report in VS 2012:I have a Solution ,and the dynamic library project is included in the Solution. Now , I want to import my static library to this project .And I have add the header...
View Articlediffering results using debug and release mode
Hi so I have a project using c++ amp and when I compile in debug mode it seems to be working fine, exactly as I expect but when I compile the program doesn't work as it should, and seen as though I...
View Articleacc = r * s throws away the previous computations of acc for all but the last...
void NBodySimpleInteractionEngine::BodyBodyInteraction(const ParticleCpu* const pParticlesIn, ParticleCpu& particleOut, int numParticles) const { float_3 pos(particleOut.pos); float_3...
View ArticleKey Things to Consider in Choosing a Video Card for Compute
What are the key things to consider when looking for a video card to be used with C++ AMP? I can't afford a high end compute dedicated GPU or workstation GPU so I'm looking at cards in the <$600...
View ArticleDynamic rank in C++ AMP
Hi,I was hoping to use C++ AMP, however I am having trouble defining the rank of multidimensional arrays dynamically.i.e. i need to define extent<N>, array_view<float, N> etc... where N is...
View ArticleSwapping array_views while maintaining data residency?
Hello all. I'm implementing an algorithm that iteratively reads from one array and writes the processed result to another. The number of times the algorithm iterates is only known at runtime. I also...
View ArticleDefault parameters to restrict(amp) functions
The following code fails to compile. The error messages are :Error1 error C3930: 'foo' : no overloaded function has restriction specifiers that are compatible with the ambient context ''Error2 error...
View ArticleIterating over arrays of different dimensions
I am using C++ AMP with Visual Studio 2012 on Windows 8. I have a case where I have 2D array_view, `experimentData` and a 1D array_view, `experimentFactors`. I want to iterate over the first dimension...
View ArticleMemory leak using ThreadPool API
I am using Windows ThreadPools in my application, and am experiencing a memory leak of 136 bytes for every call to CreateThreadPoolWork(), as seen via UMDH: + 1257728 ( 1286424 - 28696) 9459...
View ArticleDistributing Visuial Studio 2012 C++ Console-based Executable Programs
I have been compiling and distributing stand-alone console-based C++ programs using VS 2005, 2008, and 2010 for years by simply using the /MT compile option and copying the resulting *.exe to the user...
View ArticleAMP Performance issue
Hi,I'm trying to learn amp, so I put together a simple (stupid) routine that will sort 4 arrays of floats in parallel.As a test, I wrote the same code in three ways:1. Straight up C++, no parallelism2....
View ArticleC++ AMP - Pass by const value
Recently I've looked at some open source OpenCL and CUDA renderer implementations; I often see most functions (in some cases all of the functions) use pass by const value.I suppose at least in C++ it...
View ArticleWill I get TDR errors when using dedicated Video Card
I have 2 video cards and I am wanting to dedicate one of them to running my AMP kernel. I have been running my AMP kernel on the same video card which is running the main display because it is the more...
View Article