Open main menu

CDOT Wiki β

Changes

Top Solo

1 byte removed, 20:27, 7 February 2013
Assignment 1
I am going to try and profile and optimize the following function from the CImg Library.
This function creates triangles on the screen and allows the user to make them clump up by clicking the mouse buttons.
 
 
This function, like others int he CImg_demo.cpp libary uses the <CImg.h> library. This is a massive library that contains functions and routines responsible for displaying and preparing the environment for Image and Video processing. My function 'Filled Triangles' uses this library and its resources extensively.
 
 
Compilation with profiling on Mac OSX:
'''g++ -o CImg_demo CImg_demo.cpp -O2 -g -pg -I.. -Wall -W -ansi -pedantic -Dcimg_use_vt100 -I/usr/X11R6/include -lm -L/usr/X11R6/lib -lpthread -lX11'''
 
 
=== Summary of Findings ===
=== Makefile changes ===  I have made changes to the original Makefile that was provided with this library. I have customized it to compile for profiling by default. A new build can be generate by cleaning the old build (eg: make clean). The source can be compiled by running make <platform> eg: macosx, linux. You will need to download a third party program to allow you to run the 'make' command on Windows but the execution is the same. it can also be run on windows using visual Studio or on the command line("cl.exe must be in the environnent PATH variable").    === Build Instructions === This Makefile and application is crossProgram -platform. make <platform> eg: macosx, linux etc. I have successfully built this application on the following platforms: Windows 7, OpenSuse linux and Mac OSX Lion. =Filled Triangles == Issues Encountered === '''Gprof on MacOSx with Intel processor'''   The profiling tool gprog does not work on the macbooks with an Intel processor installed (I have Intel Core i5). This was verified by numerous internet resources and annoying personal experience.  '''Makefile builds EVERYTHING''' The Makefile shipped with this open source library is programmed to build all of the modules located in CImg_demo.cpp. I had to modify the Makefile to only build the specified function within the library of Image processing functions     
<pre>
gmic
 
 
#---------------------------------
 
# Set correct variables and paths
 
#---------------------------------
CIMG_VERSION = 1.5.4
endif
 
 
#--------------------------------------------------
 
# Set compilation flags allowing to customize CImg
 
#--------------------------------------------------
 
# Flags to enable strict code standards
endif
 
 
#-------------------------
 
# Define Makefile entries
 
#-------------------------
.cpp:
$(CIMG_GDI32_LDFLAGS)" \
all
</pre>
all
  === Makefile changes ===  I have made changes to the original Makefile that was provided with this library. I have customized it to compile for profiling by default. A new build can be generate by cleaning the old build (eg: make clean). The source can be compiled by running make </preplatform>eg: macosx, linux. You will need to download a third party program to allow you to run the 'make' command on Windows but the execution is the same. it can also be run on windows using visual Studio or on the command line("cl.exe must be in the environnent PATH variable"). === Build Instructions === This Makefile and application is cross-platform. make <platform> eg: macosx, linux etc. I have successfully built this application on the following platforms: Windows 7, OpenSuse linux and Mac OSX Lion.   === Issues Encountered === '''Gprof on MacOSx with Intel processor'''   The profiling tool gprog does not work on the macbooks with an Intel processor installed (I have Intel Core i5). This was verified by numerous internet resources and annoying personal experience.  '''Makefile builds EVERYTHING''' The Makefile shipped with this open source library is programmed to build all of the modules located in CImg_demo.cpp. I had to modify the Makefile to only build the specified function within the library of Image processing functions
== Assignment 2 ==
== Assignment 3 ==
1
edit