Archivo

Entradas Etiquetadas ‘c++’

Cross-compiling & debugging for RaspberryPi using CMake and gdbserver/gdb

Sábado, 16 de marzo de 2013 Sin comentarios

CMake LogoRaspi_Colour_R

The Raspberry Pi (RPi in advance) board has become in the last year one of the favourite toys for geeks & programmers. Although it has a reasonable powerful processor, if we have in mind to develop a large project in this little board, the development process should be performed in a (more suitable) workstation and then perform cross compilations to generate binaries for the RPi architecture (ARM). There already exists some available tutorials explaining how to do the cross-compilation and debugging using the Eclipse IDE. However, as most of the readers of this blog know, I don’t like to be tied to the usage of a specific IDE, and I have been using CMake for configuring my software projects for quite a while (and letting anyone using their favourite programming environment to develop). Therefore, in this post I will explain how to do the cross-compilation process with CMake and how to debug the applications in the remote target from our host workstation. Here we go! Leer más…

GD Star Rating
loading...
Share

CMake tutorial

Sábado, 1 de diciembre de 2012 Sin comentarios

Two weeks ago, I made a speech in my work about the usage of CMake for configuring C/C++ projects in order to be independent from platforms (Windows, Linux, Mac, QNX, etc) and IDEs/Editors. In this speech I treated general concepts and commands of CMake and also specific cases such us the usage of Qt and cross-compiling. I prepared the slides in my free time I decided to use a Creative Commons licence to share them with some pieces of code too. Be free to share this work in non commercial mode and with acknowledgement to the author.

cmake-tutorial

cmake-tutorial-sources


Licencia de Creative Commons

CMake tutorial by Luis Díaz Más is licensed under a Creative Commons Reconocimiento-NoComercial 3.0 Unported License.

GD Star Rating
loading...
Share
Categories: Programación, Scripting Tags: ,

Image processing with CUDA (Comparison with CPU, MMX, SSE & OpenCV)

Miércoles, 15 de agosto de 2012 Sin comentarios

CUDA Logo

En esta entrada se presenta un ejemplo de como realizar procesamiento de imágenes con CUDA, y se compara el rendimiento de una aplicación sencilla para invertir los colores de una imagen, implementada con las siguientes tecnologías y/o librerías:

  • Instrucciones aritméticas con CPU.
  • Librería OpenCV.
  • Instrucciones aritméticas usando tecnología SIMD (MMX y SSE).
  • CUDA C runtime.
  • NPP (Nvidia Performance Primitives). [librería proporcionada con el toolkit de CUDA]

Leer más…

GD Star Rating
loading...
Share
Categories: Programación Tags: , , , , , , , ,

C++ : Delete NULL Pointer

Domingo, 19 de septiembre de 2010 3 comentarios

Uno no deja de aprender cosas. Ahora me doy cuenta de que el operador delete de C++ comprueba internamente si la dirección del puntero que se le pasa es NULL o no, y en el primer caso no hace nada. Se acabó el tener que comprobar si un puntero es NULL o no antes de liberarlo. Viejos vicios de C con las funciones malloc y free

One doesn’t stop learning things. Now I realize that the C++ delete operator check internally if the pointer address is NULL or not, and in the first case the operator does nothing. No more having to check if a pointer is NULL or not before freeing. Old vices from C with malloc and free functions …

GD Star Rating
loading...
Share
Categories: Programación Tags: ,

C++: Mezclando plantillas y herencia

Viernes, 16 de julio de 2010 1 comentario

Tras varios años usando C++ aún sigo sufriendo dolores de cabeza cuando me atasco con alguna cosilla como la que os comento a continuación. Estoy desarrollando una librería en la que estoy usando bastante las plantillas y la herencia para intentar abstraer las cosas lo máximo posible. Pues bien, al intentar crear una clase plantilla derivada que heredaba comportamiento de otra clase plantilla me he encontrado con la sorpresa de que el compilador me decía que la clase derivada no tenía visibilidad sobre los miembros de la clase base. La solución a este problema es muy sencilla y os la comento a continuación.

Leer más…

GD Star Rating
loading...
Share