Can a thread call SuspendThread passing its own thread ID?
Can a Windows thread suspend itself with SuspendThread()?I can awake it from another one but, can it call SuspendThread(GetCurrentThreadId())?
View ArticleMost vexing parse confusion
I'm studying C++11 and I stumbled upon uniform initializers.I don't understand the following code which should show the "most vexing parse" ambiguity:#include<iostream>class Timer{public: Timer()...
View ArticleAnswer by Marco A. for Cuda math functions
You're probably mismatching the type of the argument and thus calling a host code function as a "fallback mechanism".Make sure you're using the right type for the function (which is not float, but...
View ArticleAnswer by Marco A. for Where is the definition of `top-level cv-qualifiers`...
From Dan Saks's Top-Level cv-Qualifiers in Function Parameters:In C++, a cv-qualifier that applies to the first level of a type is called a toplevel cv-qualifier. For example, in:T *const p;the...
View Articlewhat happens when a CUDA kernel is called?
I'm wondering what happens in a CUDA program when a line likemyKernel<<<16,4>>>(arg1,arg2);is encountered.What happens then? Is the CUDA driver invoked and the ptx code passed to it...
View Article