Giter Site home page Giter Site logo

albertozafra7 / pacs Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23.44 MB

CMake 0.91% C++ 46.34% Makefile 0.10% C 48.77% MATLAB 0.01% Batchfile 0.01% Python 0.14% Shell 0.12% HTML 0.05% Cuda 0.37% Fortran 3.15% XSLT 0.02% JavaScript 0.02% CSS 0.01%

pacs's Introduction

PACS

Official repository of the Programming and Architecture of Computing Systems course of the MS in Robotics, Graphics, and Computer Vision

Platform support

The code examples and some laboratories rely on cmake to enable multi-platform building support, so there is no need to manually write any Makefile or other build system. Linux is the preferred operating system to work on the labs, but the binaries have been also compiled on mac OS.

Although, we do not provide support for Windows. If you want to build and run the test on Windows, please consider using CMake with Visual Studio.

You can download the free community edition of Visual Studio 2019, and then with you github credentials download this repo and compile it.

One advantage of cmake is the separation between source and binary files. To generate the programs, you always have to create a build directory first, then invoke cmake to generate the build files, Makefiles for Linux, and, after than, use the standard make tool for obtaining the binaries. By default, cmake builds programs in release mode with optimizations enabled, if you want to build them with debug support; e.g., to use them with gdb, you can set the variable CMAKE_BUILD_TYPE to Debug.

Code snippets from Class

The directory code_examples contains many of the small C++ programs and fragments from the slides.

To compile them on Linux or mac OS, you can use cmake. For example:

mkdir build-release
cd build-release
cmake -DCMAKE_BUILD_TYPE=Release ../ # generate the Makefile with cmake
make # compile the examples
ls # list the examples

Please note that the invocation to cmake includes the path ../ that correspond to the parent directory where the main CMakeLists.txt file resides.

If you want to compile for debugging, please note that at this point, we will have two sets of binaries, set the variable CMAKE_BUILD_TYPE when calling cmake:

mkdir build-debug
cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ../ # generate the Makefile with cmake
make -j4 # compile the examples in parallel with 4 jobs

Also if you want to see the actual build commands, there are several alternatives such as:

make VERBOSE=1  # linux/mac OS specific
cmake --build . -v # should work on any OS
cmake --build --target hello # build a single target on Windows OS

Possible Issues

In some machines of the Computer Science Department, two different versions of cmake, versions 2 and 3, coexists. Their binary names are cmake and cmake3, respectively. Since this repository requires cmake version 3, if you get an error running cmake about the version, please switch to cmake3 executable. You can check cmake's version with:

eniac:PACS user$ cmake -version
cmake version 3.18.3

Laboratories

Each laboratory includes its own directory, but all of them can be built at the same time if required. To build a single laboratory; e.g., the third laboratory, please follow these steps:

mkdir -p build-release
cd build-release
rm -rf ./ # only run this command inside build-release directory
cmake -DCMAKE_BUILD_TYPE=Release ../
cd Laboratory-3
make -j2 # compile two jobs in parallel

One workflow approach for the labs is to develop and test in debug mode, inside a build-debug directory, and switch to release, in another build-release directory, to run the final experiments and obtain execution times or other metrics.

pacs's People

Contributors

dsanz23 avatar albertozafra7 avatar dariosg avatar alvabre-unizar avatar rgran avatar

Watchers

 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.