有一段很久之前的CUDA 4.2的代码,现在需要移植到最新的9.0版本下,遇到了一个小问题但不知道怎么解决。
#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;
vs2015中提示texture is not a template, can not resolve symbol ‘texture’。请教怎么解决这个问题,需要include哪个头文件?
谢谢!