[CSC 435] Library building

Andrew J. Pounds pounds_aj at mercer.edu
Sun Apr 3 07:02:17 EDT 2016


On 04/03/2016 03:39 AM, Vicenzo Abichequer wrote:
>
> Hi, Andrew.
>
> I’m a little confused about the library thing. Uhm, as I understood, I 
> will first need to build three libraries for the stock, OpenMP and 
> PThreads versions, right? Then I will mash these bad boys into one 
> library? Would I need to separate all the files into 3 versions of 
> them or I can slice ‘em with #ifdef clauses?
>
> Thanks.
>

If you look back at the description

http://theochem.mercer.edu/csc435/assignments/proj2_2016.pdf

It tells you that in the final library the functions will have to have 
unique names.  For example, ompdot would be the name of the library dot 
product function that uses OpenMP parallelization. You could create 
separate targets in your makefile dot.o, ompdot.o, pthdot.o, etc., and 
then use the -D compiler flag to select which ifdefs to activate in your 
code.


-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University,  Macon, GA 31207   (478) 301-5627
http://faculty.mercer.edu/pounds_aj

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc435/attachments/20160403/168be96b/attachment.html>


More information about the csc435 mailing list