File: mul2.rb

package info (click to toggle)
libnarray-ruby 0.5.9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 564 kB
  • ctags: 564
  • sloc: ansic: 4,620; ruby: 1,513; python: 70; makefile: 5
file content (13 lines) | stat: -rw-r--r-- 207 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'mybench'

a = NArray.float(1000,1).indgen!
b = NArray.float(1,1000).indgen!
c = 0

print "a = "; p a;
print "b = "; p b;
print "calculating c = a*b ...\n"

bench_time{ c = a*b }

print "c = "; p c;