Skip to content

Commit

Permalink
Merge branch 'tmp'
Browse files Browse the repository at this point in the history
  • Loading branch information
rfabbri committed Nov 13, 2023
2 parents 09513b5 + 66c7811 commit 1502ddd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ from, specially under Linux.

### Profiling

#### Kcachegrid
The best way is with kcachegrind + valgrind, by far.
See [https://www.blogger.com/comment.g?blogID=7395958&postID=116062684092668856&bpli=1&pli=1]

Expand All @@ -398,6 +399,20 @@ In any system without valgrind or kcachegrind (eg, Macs), the easiest way is wit
Expect your program to take very very long - so reduce the problem / iterations
before running.

#### GPerftools
https://github.com/gperftools/gperftools
https://gperftools.github.io/gperftools/cpuprofile.html

Runs the program on real CPU. To use it, install it with homebrew, then link the
program with libprofiler (add -Lpath_to_installed_gperftools -lprofiler) and run
with CPUPROFILE environment variable set to some filename (CPUPROFILE=profile01
./the_program). It will profile the program using interval timer (setitimer) and
output profiling data to the filename, defined in CPUPROFILE env var. Then you
can view profile data in command-line or with svg/web browser using pprof perl
script from gperftools (pprof ./the_program profile01).

pprof --pdf ./minus-chicago /tmp/prof >/tmp/p.pdf

### Compilers

This was extensively tested with GCC 5
Expand Down
4 changes: 4 additions & 0 deletions minus/minus.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include "minus.h"
#include "internal-util.hxx"

// not really necessary:
#define EIGEN_UNROLLING_LIMIT 1000
// _really_ necessary:
#define EIGEN_STRONG_INLINE __attribute__((always_inline))
//#include "Eigen-latest/Core"
#include "Eigen/Core"

Expand Down

0 comments on commit 1502ddd

Please sign in to comment.