Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add tDot
  • Loading branch information
yuz12012 committed Apr 24, 2017
1 parent d19d590 commit ffb14a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parallel/para_gibbs.cu
Expand Up @@ -87,7 +87,7 @@ __global__ void seqMetroProcess(int K, int nBlocks, int *y, float *n, curandStat
__device__ void sample_theta_seq(float *theta, float *log_theta, int *y, float *n,
float a, float b, int K, curandState *state);

__global__ void mergePosterior(int trials, float *dev_a_out,float *dev_b_out);
__global__ void mergePosterior(int trials, float *dev_a_out,float *dev_b_out,int *tDot);

int main(int argc, char **argv){

Expand Down Expand Up @@ -142,8 +142,8 @@ int main(int argc, char **argv){
//seqMetroProcess<<<nBlocks,1>>>(K,nBlocks,dev_y,dev_n,devStates,dev_theta,dev_log_theta,a,b,trials);
seqMetroProcess<<<nBlocks,nThreads>>>(K,nBlocks,dev_y,dev_n,devStates,dev_theta,dev_log_theta,a,b,dev_a_out,dev_b_out,trials);


mergePosterior<<<1,1>>>(trials,dev_a_out,dev_b_out);
int *tDot;
mergePosterior<<<1,1>>>(trials,dev_a_out,dev_b_out,tDot);
/*------ Free Memory -------------------------------------------*/

free(y);
Expand All @@ -158,7 +158,7 @@ int main(int argc, char **argv){
return EXIT_SUCCESS;
}

__global__ void mergePosterior(int trials, float *dev_a_out,float *dev_b_out){
__global__ void mergePosterior(int trials, float *dev_a_out,float *dev_b_out,int *tDot){
/* printf("\n all blocks finished\n");
for(int j = 0; j < trials ; j++) {
printf(" %f ", *dev_a_out);
Expand Down

0 comments on commit ffb14a1

Please sign in to comment.