Difference for src/ComputeNonbondedCUDAKernel.cu from version 1.37 to 1.38

version 1.37version 1.38
Line 21
Line 21
  
 void cuda_bind_exclusions(const unsigned int *t, int n) { void cuda_bind_exclusions(const unsigned int *t, int n) {
   exclusions_size = n;   exclusions_size = n;
    static __thread int exclusions_alloc;
    if ( exclusions && exclusions_alloc < exclusions_size ) {
      cudaFree(exclusions);
      cuda_errcheck("freeing exclusions");
      cudaFree(overflow_exclusions);
      cuda_errcheck("freeing overflow_exclusions");
      exclusions = 0;
    }
    if ( ! exclusions ) {
      exclusions_alloc = exclusions_size;
   cudaMalloc((void**) &exclusions, n*sizeof(unsigned int));   cudaMalloc((void**) &exclusions, n*sizeof(unsigned int));
   cuda_errcheck("malloc exclusions");   cuda_errcheck("malloc exclusions");
      cudaMalloc((void**) &overflow_exclusions, n*sizeof(unsigned int));
      cuda_errcheck("malloc overflow_exclusions");
    }
   cudaMemcpy(exclusions, t, n*sizeof(unsigned int), cudaMemcpyHostToDevice);   cudaMemcpy(exclusions, t, n*sizeof(unsigned int), cudaMemcpyHostToDevice);
   cuda_errcheck("memcpy exclusions");   cuda_errcheck("memcpy exclusions");
   tex_exclusions.normalized = false;   tex_exclusions.normalized = false;
Line 31
Line 44
   cudaBindTexture(NULL, tex_exclusions, exclusions, n*sizeof(unsigned int));   cudaBindTexture(NULL, tex_exclusions, exclusions, n*sizeof(unsigned int));
   cuda_errcheck("binding exclusions to texture");   cuda_errcheck("binding exclusions to texture");
  
   cudaMalloc((void**) &overflow_exclusions, n*sizeof(unsigned int)); 
   cuda_errcheck("malloc overflow_exclusions"); 
   cudaMemcpy(overflow_exclusions, t,   cudaMemcpy(overflow_exclusions, t,
  n*sizeof(unsigned int), cudaMemcpyHostToDevice);  n*sizeof(unsigned int), cudaMemcpyHostToDevice);
   cuda_errcheck("memcpy to overflow_exclusions");   cuda_errcheck("memcpy to overflow_exclusions");


Legend:
Removed in v.1.37 
changed lines
 Added in v.1.38



Made by using version 1.53 of cvs2html