def analyze(self):
self.results = self.calculate_cache_access()<EOL>try:<EOL><INDENT>iaca_analysis, asm_block = self.kernel.iaca_analysis(<EOL>micro_architecture=self.machine['<STR_LIT>'],<EOL>asm_block=self.asm_block,<EOL>pointer_increment=self.pointer_increment,<EOL>verbose=self.verbose > <NUM_LIT:2>)<EOL><DEDENT>except RuntimeError as e:<EOL><INDENT>print("<STR_LIT>" + str(e))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>block_throughput = iaca_analysis['<STR_LIT>']<EOL>uops = iaca_analysis['<STR_LIT>']<EOL>iaca_output = iaca_analysis['<STR_LIT>']<EOL>port_cycles = iaca_analysis['<STR_LIT>']<EOL>elements_per_block = abs(asm_block['<STR_LIT>']<EOL>/ self.kernel.datatypes_size[self.kernel.datatype])<EOL>block_size = elements_per_block*self.kernel.datatypes_size[self.kernel.datatype]<EOL>try:<EOL><INDENT>block_to_cl_ratio = float(self.machine['<STR_LIT>'])/block_size<EOL><DEDENT>except ZeroDivisionError as e:<EOL><INDENT>print("<STR_LIT>", e, file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>port_cycles = dict([(i[<NUM_LIT:0>], i[<NUM_LIT:1>]*block_to_cl_ratio) for i in list(port_cycles.items())])<EOL>uops = uops*block_to_cl_ratio<EOL>cl_throughput = block_throughput*block_to_cl_ratio<EOL>flops_per_element = sum(self.kernel._flops.values())<EOL>self.results['<STR_LIT>'][<NUM_LIT:0>] = None<EOL>self.results['<STR_LIT>'] = self.conv_perf(PrefixedUnit(float('<STR_LIT>'), '<STR_LIT>'))<EOL>self.results['<STR_LIT>'] = None<EOL>for level, bottleneck in enumerate(self.results['<STR_LIT>']):<EOL><INDENT>if level == <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>if bottleneck['<STR_LIT>']['<STR_LIT>'] < self.results['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>self.results['<STR_LIT>'] = level<EOL>self.results['<STR_LIT>'] = bottleneck['<STR_LIT>']<EOL><DEDENT><DEDENT>self.results.update({<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': port_cycles,<EOL>'<STR_LIT>': cl_throughput,<EOL>'<STR_LIT>': uops,<EOL>'<STR_LIT>': self.conv_perf(PrefixedUnit(<EOL>self.machine['<STR_LIT>']/block_throughput*elements_per_block*flops_per_element<EOL>* self.cores, "<STR_LIT>")),<EOL>'<STR_LIT>': iaca_output}})<EOL>
Run complete analysis.