source: CIVL/examples/languageFeatures/bundleSize.cvl@ 90dd7d7

1.23 2.0 main test-branch
Last change on this file since 90dd7d7 was a745216, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago

Added implementation and test for $bundle_size.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@189 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 280 bytes
Line 
1#include<civlc.h>
2
3int N=5;
4$input double a[N];
5
6void main() {
7 $bundle bun;
8 int size;
9
10 for (int i=0; i<N; i++) a[i] = i;
11 bun = $bundle_pack(&a[0], N*sizeof(double));
12 size = $bundle_size(bun);
13 $assert size == N*sizeof(double);
14 $assert size / sizeof(double) == N;
15}
Note: See TracBrowser for help on using the repository browser.