OpenCV  4.1.0
Open Source Computer Vision
Macros
datamov_utils.hpp File Reference
#include "common.hpp"

Macros

#define OPENCV_CUDA_ASM_PTR   "r"
 
#define OPENCV_CUDA_DEFINE_FORCE_GLOB(base_type, ptx_type, reg_mod)
 
#define OPENCV_CUDA_DEFINE_FORCE_GLOB_B(base_type, ptx_type)
 

Detailed Description

Deprecated:
Use Device layer instead.

Macro Definition Documentation

#define OPENCV_CUDA_ASM_PTR   "r"
#define OPENCV_CUDA_DEFINE_FORCE_GLOB (   base_type,
  ptx_type,
  reg_mod 
)
Value:
template <> struct ForceGlob<base_type> \
{ \
__device__ __forceinline__ static void Load(const base_type* ptr, int offset, base_type& val) \
{ \
asm("ld.global."#ptx_type" %0, [%1];" : "="#reg_mod(val) : OPENCV_CUDA_ASM_PTR(ptr + offset)); \
} \
};
#define OPENCV_CUDA_DEFINE_FORCE_GLOB_B (   base_type,
  ptx_type 
)
Value:
template <> struct ForceGlob<base_type> \
{ \
__device__ __forceinline__ static void Load(const base_type* ptr, int offset, base_type& val) \
{ \
asm("ld.global."#ptx_type" %0, [%1];" : "=r"(*reinterpret_cast<uint*>(&val)) : OPENCV_CUDA_ASM_PTR(ptr + offset)); \
} \
};