Calculating sum of primes using the CPU and GPU
Try not to use using namespace std.
This is lacking in curly braces and could be bad for maintenance:


if(n == 2)
    return true;
if(n % 2 == 0)
    return false;
uint32_t sr = sqrtf(n);

for(uint32_t i = 3; i &lt;= sr; i += 2)
    if(n % i == 0)
        return false;
return true;



It's a good idea to still use them for single-line statements, and you should especially use them with for loops.  Some extra whitespace in places could be useful as well.

Here's what it should look like:

if (n == 2)
{
    return true;
}
if (n % 2 == 0)
{
    return false;
}

uint32_t sr = sqrtf(n);

for (uint32_t i = 3; i &lt;= sr; i += 2)
{
    if (n % i == 0)
    {
        return false;
    }
}

return true;

Consider finding an alternative to sqrtf() as it can be slow.  It may not make a huge difference in overall runtime, though.  Fortunately, it appears to be thread-safe.
One source of slower performance may be the if statement in prime_sum().  Doing so may cause thread divergence, if threads end up executing different instructions.  You'll have to analyze your code to determine this for sure.
This line seems confusing:


start = time(0) - start;



It appears that the lvalue should instead be named end since you already calculate a starting time beforehand.