Reply to comment

вроде бы собрал, на основе template проекта из SDK, всё получилось, однако мне кроме CUDA надо подключить и обычный код для загрузки PNG файлов, в частности хедер и статик-либрари, однако пока что сыпяться ошибки. Вот мой makefile

EXECUTABLE := ../../../src/projectc/build/ptest
CUFILES := projectc.cu
CU_DEPS := matutils.cu
CCFILES := image.cpp
include ../../common/common.mk
CXXFLAGS += -I/usr/include -I/usr/local/include -I. -I..
CXXFLAGS += -L/usr/lib -L/usr/local/lib -L/usr/local/cuda/lib/ -O3
LDFLAGS += -lpng

где project.cu - основной файл с main функцией, matutils.cu - файл с функциями CUDA, image.cpp - файл с обычными функциями по загрузке PNG изображения. Только пока то, что в image.cpp ошибки, так как он не видит хедеры stdio.h png.h и т.д., которые я вставил в projectc.cu , а именно:

#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "math.h"
#include "time.h"
#include "png.h"
using namespace std
#include
#include
#include
#include

С чем это связано? Файлы с расширением .cu полностью отдаются на компиляцию в CUDA или там можно писать код обычного С++?

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <i> <table> <td> <tr> <th>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Images can be added to this post.

More information about formatting options

Copyright © 2008-2011 Alex Tutubalin