cuda_helpers.h 335 Bytes
Newer Older
1
2
3
4
// Parts of this code are from torchvision licensed under
// SPDX-FileCopyrightText: Soumith Chintala 2016
// SPDX-License-Identifier: BSD-3-Clause

mibaumgartner's avatar
NMS  
mibaumgartner committed
5
6
7
8
9
#pragma once

#define CUDA_1D_KERNEL_LOOP(i, n)                                \
  for (int i = (blockIdx.x * blockDim.x) + threadIdx.x; i < (n); \
       i += (blockDim.x * gridDim.x))