Skip to content
Permalink
Browse files

add tDot

  • Loading branch information
yuz12012 committed Apr 24, 2017
1 parent d19d590 commit ffb14a147794ef00d8954c97f9a8af09fa8b5228
Showing with 4 additions and 4 deletions.
  1. +4 −4 parallel/para_gibbs.cu
@@ -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){

@@ -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);
@@ -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);

0 comments on commit ffb14a1

Please sign in to comment.
You can’t perform that action at this time.