~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to scripts/plot-align.py

  • Committer: Will Newton
  • Date: 2013-03-26 10:19:35 UTC
  • Revision ID: will.newton@linaro.org-20130326101935-c4i81dht78p9voqf
Integrate NEON/VFP/ARM optimised memcpy implementation.
Add --with-vfp configure option to allow testing VFP code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
    records = [x for x in records if x.bytes==bytes and x.function==function]
13
13
 
14
14
    variants = libplot.unique(records, 'variant', prefer='this')
15
 
    alignments = libplot.unique(records, ('src_alignment', 'dst_alignment'))
 
15
    alignments = libplot.unique(records, 'alignment')
16
16
 
17
17
    X = pylab.arange(len(alignments))
18
18
    width = 1.0/(len(variants)+1)
26
26
        heights = []
27
27
 
28
28
        for alignment in alignments:
29
 
            matches = [x for x in records if x.variant==variant and x.src_alignment==alignment[0] and x.dst_alignment==alignment[1]]
 
29
            matches = [x for x in records if x.variant==variant and x.alignment==alignment]
30
30
 
31
31
            if matches:
32
 
                vals = [match.bytes*match.loops/match.elapsed/(1024*1024) for
33
 
                        match in matches]
34
 
                mean = sum(vals)/len(vals)
35
 
                heights.append(mean)
 
32
                match = matches[0]
 
33
                heights.append(match.bytes*match.loops/match.elapsed/(1024*1024))
36
34
            else:
37
35
                heights.append(0)
38
36
 
40
38
 
41
39
 
42
40
    axes = pylab.axes()
43
 
    if libplot.alignments_equal(alignments):
44
 
        alignment_labels = ["%s" % x[0] for x in alignments]
45
 
    else:
46
 
        alignment_labels = ["%s:%s" % (x[0], x[1]) for x in alignments]
47
 
    axes.set_xticklabels(alignment_labels)
 
41
    axes.set_xticklabels(alignments)
48
42
    axes.set_xticks(X + 0.5)
49
43
 
50
44
    pylab.title('Performance of different variants of %(function)s for %(bytes)d byte blocks' % locals())