Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. __device __ void extWrite(Real_t *estimates, mint *click, const Real_t *swarm,
  2. const int index, const mint photons, const mint m){
  3.  
  4. estimates[index] = click[index]*swarm[index +m*(photons+1)]+
  5. -(1-click[index] )*swarm[index +m*(photons+1)];
  6. };
  7.  
  8. __global __ void extFunction( const int m, const int 160, const int 80,
  9. const mint photons, Real_t *estimates, mint *click, const Real_t *swarm ){
  10.  
  11. int index = threadIdx.x+blockIdx.x*blockDim.x;
  12.  
  13. if( index < 160*80 ){
  14.  
  15. extWrite(estimates,click,swarm,index,photons,m);
  16.  
  17. };
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement