#include<iostream>
#include<cuda.h>
#include<cuda_runtime.h>
#include<time.h>
#include<math.h>
using namespace std;
const int Num=10000000;
const int threads=256;
const int blocks=2048;
__global__ void kernel(int* a,int* b,int* c)
{
const int tid=blockIdx.x*blockDim.x+threadIdx.x;
for(long i=tid;i<Num+gridDim.x*blockDim.x;i+=gridDim.x*blockDim.x)
{
if(i<Num)
{
//a[i]=(int)sqrtf(b[i])%(int)sqrtf(c[i]);
a[i]=b[i]%c[i];
}
}
}
int main(void)
{
//声明数组
int *arr_host1,*arr_host2,*host,*arr_dev1,*arr_dev2,*dev;
arr_host1=new int[Num]
#include<cuda.h>
#include<cuda_runtime.h>
#include<time.h>
#include<math.h>
using namespace std;
const int Num=10000000;
const int threads=256;
const int blocks=2048;
__global__ void kernel(int* a,int* b,int* c)
{
const int tid=blockIdx.x*blockDim.x+threadIdx.x;
for(long i=tid;i<Num+gridDim.x*blockDim.x;i+=gridDim.x*blockDim.x)
{
if(i<Num)
{
//a[i]=(int)sqrtf(b[i])%(int)sqrtf(c[i]);
a[i]=b[i]%c[i];
}
}
}
int main(void)
{
//声明数组
int *arr_host1,*arr_host2,*host,*arr_dev1,*arr_dev2,*dev;
arr_host1=new int[Num]