I am trying to migrate a piece of ancient CUDA 4.2 code to CUDA 9.0, and struggling with a simple but hard to solve problem. My code is as the belowing:
#include “Core.cuh”
#include “texture_types.h”
#include “cuda_runtime.h”
#include “device_launch_parameters.h”
#include <stdlib.h>
texture<short, cudaTextureType3D, cudaReadModeNormalizedFloat> gTexDensity;
texture<short, cudaTextureType3D, cudaReadModeNormalizedFloat> gTexGradientMagnitude;
texture<float, cudaTextureType3D, cudaReadModeElementType> gTexExtinction;
texture<float, cudaTextureType1D, cudaReadModeElementType> gTexOpacity;
texture<float4, cudaTextureType1D, cudaReadModeElementType> gTexDiffuse;
texture<float4, cudaTextureType1D, cudaReadModeElementType> gTexSpecular;
texture<float, cudaTextureType1D, cudaReadModeElementType> gTexRoughness;
texture<float4, cudaTextureType1D, cudaReadModeElementType> gTexEmission;
texture<uchar4, cudaTextureType2D, cudaReadModeNormalizedFloat> gTexRunningEstimateRgba;
I use visual studio 2015, and the resharper notifies me with:
texture is not a template, cannot resolve symbol ‘texture’.
It seems that I am missing some header file to be included, but I don’t know what it is in CUDA 9.0.
Can anyone here help me with this. Thanks a lot in advance!
Cheers,
vismaster