29 #include "../integrator.hpp"
30 #include "../log/log.hpp"
31 #include "../plugin.hpp"
75 return ((blockIdx.z * gridDim.y + blockIdx.y) * gridDim.x + blockIdx.x) * blockDim.x + threadIdx.x;
121 template<
class Impl,
class T>
123 extern __shared__
char shared_mem[];
126 int idx = i *
sizeof(double)
127 + b * SHMEM_CHUNK_SIZE
128 * Impl::shmem_per_system(compile_time_param);
129 return &shared_mem[idx];
150 int spb = cfg.
optional(
"system_per_block",0);
179 const int nbod = T::n;
180 const int body_comp = nbod * 3;
181 const int pair_count = nbod * (nbod - 1) / 2;
182 return (body_comp>pair_count) ? body_comp : pair_count;
196 const int nbod = T::n;
197 const int pair_count = nbod * (nbod - 1) / 2;
198 return pair_count * 3 * 2 *
sizeof(double);