| [eigen] Getting started / Compiling and running your first program | 
[ Thread Index | 
Date Index
| More lists.tuxfamily.org/eigen Archives
] 
- To: eigen@xxxxxxxxxxxxxxxxxxx
 
- Subject: [eigen] Getting started / Compiling and running your first program
 
- From: Thomas Klimpel <jacques.gentzen@xxxxxxxxx>
 
- Date: Thu, 31 Jan 2019 18:30:51 +0100
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20161025;        h=mime-version:from:date:message-id:subject:to;        bh=e3EOXi+w9C+TM+LH5WDbC51chzbYBE7ue3m9KXWZPIg=;        b=gahHTw5MvbgfjEaWKuceu2e3plxs45+nPXqa1CIH5eGGQG6puPkw864Em/5ggGD4Be         kg64kk0IFGgpVzgpQLryUG/sizK8riKY9QbtDerVBdLqXtsqmi6nSeVlLCD1Q41fleBM         Gu8MVNfmP6S1MdfglJd3EiPaj1dFGY/Fvxuol2VK6ZL7+zLTwG1enf+c4/v1g0NKBg7o         rVzK3VlFQdXfQwMwQZ8Uj/UeBql/tjmF+wAO2w95SpXx37qObsK6wdnKg4moRZKtfNVI         wbXE3kBxFR5tZcpVs9IQIOVK0cLkRT8WJFsdjQoOx9OZYvooKLLHwmzqShENwuE5a6ql         ewdg==
 
Hi,
http://eigen.tuxfamily.org/dox/GettingStarted.html
in section
Compiling and running your first program
suggests
g++ -I /path/to/eigen/ my_program.cpp -o my_program
How about also suggesting an example with typical release compile
flags? Something like:
g++ -I /path/to/eigen/ my_program.cpp -o my_program -O2 -DNDEBUG
-march=native -mtune=native
Not sure whether it would really save any beginner from unknowingly
benchmarking different linear algebra libraries in debug mode, but at
least we can try. (I just read such a benchmarking report, with Eigen
and PETSc as the libraries... As you can imagine, the C library had
some speed advantages over the C++ template library under those
circumstances.)
Regards,
Thomas