File: test_cpu.mw

package info (click to toggle)
mwrap 1.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: cpp: 3,271; ansic: 856; makefile: 252; lex: 233; sh: 2
file content (14 lines) | stat: -rw-r--r-- 309 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$void TimesTwo_cpu(double *A,
$                         double *B,
$                         int const N)
${
$   int i;
$   for(i = 0; i<N; i++){
$        B[i] = 2.0 * A[i];
$    }
$}

@function result = timestwo_cpu(a)
  n = numel(a)
  # TimesTwo_cpu(cpu double[] a, cpu output double[n] result, int n);
end