Mercurial > hg > GearsTemplate
changeset 567:9adcf0da19b3
tweak
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 23 Nov 2019 16:43:24 +0900 |
parents | dada17cba91d |
children | 840597c5d242 |
files | src/parallel_execution/auto_generate_context.pl src/parallel_execution/lib/Gears.pm |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/auto_generate_context.pl Sat Nov 23 16:27:58 2019 +0900 +++ b/src/parallel_execution/auto_generate_context.pl Sat Nov 23 16:43:24 2019 +0900 @@ -3,6 +3,7 @@ use warnings; use Gears; use DDP {deparse => 1}; +use Data::Dumper; my @cbc_files = <DATA>; chomp @cbc_files; @@ -10,6 +11,7 @@ $gears->extraction_dg_compile_sources(); p $gears; +print Dumper $gears; __DATA__ /Users/anatofuz/src/firefly/hg/Gears/src/parallel_execution/examples/calc/calc.cbc
--- a/src/parallel_execution/lib/Gears.pm Sat Nov 23 16:27:58 2019 +0900 +++ b/src/parallel_execution/lib/Gears.pm Sat Nov 23 16:43:24 2019 +0900 @@ -24,9 +24,7 @@ sub extraction_dg_compile_sources { my $self = shift; - for my $cbc (@{$self->{compile_sources}}) { - $self->extraction_data_gears($cbc); - } + map { $self->extraction_data_gears($_) } @{$self->{compile_sources}}; } sub extraction_data_gears { @@ -34,14 +32,14 @@ open my $fh , '<', $cbc_file; while (my $line = <$fh>) { if ($line =~ /#interface\s*"(.*)\.h"/) { - $self->{data_gears_with_count}->{$1}++; + $self->{data_gears_with_count}->{$1}->{caller}->{$cbc_file}++; push(@{$self->{interfaces}}, "$1.h"); next; } if ($line =~ /__code/) { while ($line =~ /struct (\w+)*/g) { - $self->{data_gears_with_count}->{$1}++; + $self->{data_gears_with_count}->{$1}->{caller}->{$cbc_file}++; } } }