Giter Club home page Giter Club logo

cuda-workshop's Introduction

CUDA Workshop Projects

Here is an organized folder to develop CUDA applications which should work unchanged under Mac OS X, Linux or Windows.

Configuration

Install CMake via the installer or your package manger, e.g. on OS X you can do:

$ brew install cmake

Install CUDA 4.x from NVIDIA's CUDA Zone.

Finally you will also need to make sure that GLEW is installed.

Adding a new project

In the src/ create a project folder e.g. matrixMul/ with its source files and create a new CMakeLists.txt listing the CUDA and C/C++ files and the libraries to link against e.g.:

INCLUDE_DIRECTORIES(
  .
)

CUDA_ADD_EXECUTABLE (matrixMul
  matrixMul.cu
  matrixMul_gold.cpp
)
  
TARGET_LINK_LIBRARIES (matrixMul
  cutil
  shrutil
  ${CUDA_CUBLAS_LIBRARIES}
)

Finally add the new project folder, for example matrixMul to the src/CMakeLists.txt file:

add_subdirectory (matrixMul)

Compiling

Open a Visual Studio command shell or a terminal in Mac OS X or Linux and go to the top directory and do:

$ cmake CMakeLists.txt

Under Windows this should create a Visual Studio project file which you can open, and under Mac OS X or Linux do:

$ make

and hopefully the CUDA executable will be compiled in the bin/ folder.

License

Please refer to the NVIDIA end user license agreement (EULA) associated with this source code for terms and conditions that govern your use of this software.

cuda-workshop's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.