Skip to content

Commit

Permalink
Update kernel.cu
Browse files Browse the repository at this point in the history
  • Loading branch information
gisers authored Jun 22, 2018
1 parent 0cfc1e1 commit 7b87bf7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Codes/kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ __global__ void Blending2_pairs(float **image_pairs,int num_pairs,int Height,int
weight=1.0/((1.0-r[r1+Width*s1])*d+0.0000001);
for( m=0;m<BandNum*num_pairs;m++)
{
<<<<<<< HEAD
Average1[m]+=(image_pairs[m%BandNum +2*num_pairs*BandNum][r1+Width*s1]-image_pairs[m+num_pairs*BandNum][r1+Width*s1])*weight;
=======
Average1[m]+=(image_pairs[m%BandNum+2*num_pairs*BandNum][r1+Width*s1]-image_pairs[m+num_pairs*BandNum][r1+Width*s1])*weight;
>>>>>>> 377e39ad22c81bd8790d7be38913158d7e290c00
//Average2[m]+=(BufferIn55[m][r1+Width*s1]-BufferIn44[m][r1+Width*s1])*weight;
Average3[m]+=image_pairs[m][r1+Width*s1]*weight;
//Average4[m]+=BufferIn33[m][r1+Width*s1]*weight;
Expand Down Expand Up @@ -493,11 +489,8 @@ __global__ void Blending2(float **BufferIn11,float **BufferIn22,float **BufferIn
{
location_p[n1+Idx*Win_size1*Win_size1]=r1+Width*s1;
d=1+sqrt((float)((r1-i)*(r1-i)+(s1-j)*(s1-j)))/(float)(Win_size1/2);
<<<<<<< HEAD
weight=1.0/((1.0-r[r1+Width*s1])*d+0.0000001 );
=======

weight=1.0/((1.0-r[r1+Width*s1])*d+0.0000001);
>>>>>>> 377e39ad22c81bd8790d7be38913158d7e290c00
for( m=0;m<BandNum;m++)
{
Average1[m]+=(BufferIn55[m][r1+Width*s1]-BufferIn22[m][r1+Width*s1])*weight;
Expand Down Expand Up @@ -1042,7 +1035,7 @@ void Re_fusion3(CuLayer *psensor,PARAMETER *par)
//e.Blending2(BufferLandsat_0,BufferModis_0,BufferLandsat_1,BufferModis_1,BufferModis_2,BufferOutColor,height,width,win_size,flag, L_err, M_err, Para_h,BandNum,1.0);
long now1 = clock();
runtest(BufferLandsat_0,BufferModis_0,BufferLandsat_1,BufferModis_1,BufferModis_2,BufferOutColor,height,width,win_size,M_err,BandNum,class_num,_nodata);
printf("GPUÔËÐÐʱ¼äΪ£º%dms\n", int(((double)(clock() - now1)) / CLOCKS_PER_SEC * 1000));
printf("GPUÔËÐÐʱ¼äΪ£º%dms\n", int(((double)(clock() - now1)) / CLOCKS_PER_SEC * 1000));
for (b=0;b<BandNum;b++)
{
GDALRasterBand* HOut = LandsatDs->GetRasterBand(b+1);
Expand Down

0 comments on commit 7b87bf7

Please sign in to comment.