cudaMemcpyToSymbol flaw/misunderstanding

My question is why does cudaMemcpyToSymbol copy one scalar value to multiple constants in the following code:

#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include<iostream>
#include <stdio.h>

cudaError_t addWithCuda(int *c, const int *a, const int *b, size_t size);
device constant float s,t,u,v;
global void addKernel(float *a,float b)
{
int i = threadIdx.x;
a = 2s;
}

int main()
{
float a = 10,b(3.0),c(4.0),d(101.2);
float deva;
cudaMalloc((void
*)&deva,sizeof(float));
cudaMemcpyToSymbol(s,&a,sizeof(a), 0, cudaMemcpyHostToDevice);
cudaMemcpyToSymbol(t,&b,sizeof(b), 0, cudaMemcpyHostToDevice);
cudaMemcpyToSymbol(u,&c,sizeof©, 0, cudaMemcpyHostToDevice);
cudaMemcpyToSymbol(v,&d,sizeof(d), 0, cudaMemcpyHostToDevice);
std::cout<<c<<"
“;
cudaMemcpyFromSymbol(&c,s,sizeof©, 0, cudaMemcpyDeviceToHost);
cudaMemcpy(deva,&a,sizeof(a),cudaMemcpyHostToDevice);
addKernel<<<1,1>>>(deva,c);
std::cout<<b<<”
“;
cudaMemcpy(&b,deva,sizeof(deva),cudaMemcpyDeviceToHost);
std::cout<<b<<”
";
system(“pause”);
return 0;
}

Nsight tells me the value of a is copied to ever constant variable. why is this?

My question is why does cudaMemcpyToSymbol copy one scalar value to multiple constants in the following code:

#include “cuda_runtime.h”
#include “device_launch_parameters.h”
#include
#include <stdio.h>

cudaError_t addWithCuda(int *c, const int *a, const int *b, size_t size);
device constant float s,t,u,v;
global void addKernel(float *a,float b)
{
int i = threadIdx.x;
a = 2s;
}

int main()
{
float a = 10,b(3.0),c(4.0),d(101.2);
float deva;
cudaMalloc((void
*)&deva,sizeof(float));
cudaMemcpyToSymbol(s,&a,sizeof(a), 0, cudaMemcpyHostToDevice);
cudaMemcpyToSymbol(t,&b,sizeof(b), 0, cudaMemcpyHostToDevice);
cudaMemcpyToSymbol(u,&c,sizeof©, 0, cudaMemcpyHostToDevice);
cudaMemcpyToSymbol(v,&d,sizeof(d), 0, cudaMemcpyHostToDevice);
std::cout<<c<<"\n";
cudaMemcpyFromSymbol(&c,s,sizeof©, 0, cudaMemcpyDeviceToHost);
cudaMemcpy(deva,&a,sizeof(a),cudaMemcpyHostToDevice);
addKernel<<<1,1>>>(deva,c);
std::cout<<b<<"\n";
cudaMemcpy(&b,deva,sizeof(deva),cudaMemcpyDeviceToHost);
std::cout<<b<<"\n";
system(“pause”);
return 0;
}

Nsight tells me the value of a is copied to ever constant variable. why is this?

Works as expected: