- Timestamp:
- Oct 16, 2023, 8:09:51 AM (2 years ago)
- Branches:
- master
- Children:
- 2bf46a5, 54e59dd, 61e5d99
- Parents:
- 946a6e4 (diff), 8cbe732 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- tests
- Files:
-
- 5 edited
-
.expect/linkonce.txt (modified) (1 diff)
-
concurrency/cofor.cfa (modified) (1 diff)
-
link-once/main.cfa (modified) (1 diff)
-
link-once/partner.cfa (modified) (1 diff)
-
test.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/linkonce.txt
r946a6e4 ra97b9ed 1 signed= -7 unsigned=121 signed=7 unsigned=12 -
tests/concurrency/cofor.cfa
r946a6e4 ra97b9ed 1 1 #include <cofor.hfa> 2 2 3 long total = 0; 4 void add_num( void * arg ) { __atomic_fetch_add( &total, (long)arg, __ATOMIC_SEQ_CST ); }3 4 void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); } 5 5 6 6 int main() { 7 7 printf("start\n"); 8 8 processor p[4]; 9 long total = 0; 9 10 COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); ); 10 parallel_stmt_t stmts[5] = { add_num, add_num, add_num, add_num, add_num }; 11 void * nums[5] = { (void *)11, (void *)12, (void *)13, (void *)14, (void *)15 }; 12 parallel( stmts, nums, 5 ); 11 { 12 corun; // does nothing 13 corun{}; // does nothing 14 corun add_num( &total, 11 ); 15 corun { add_num( &total, 12 ); } 16 corun __atomic_fetch_add( &total, 13, __ATOMIC_SEQ_CST ); 17 corun { __atomic_fetch_add( &total, 14, __ATOMIC_SEQ_CST ); } 18 __atomic_fetch_add( &total, 15, __ATOMIC_SEQ_CST ); // run by main thd 19 } 13 20 printf("total: %ld\n", total); 14 21 printf("done\n"); -
tests/link-once/main.cfa
r946a6e4 ra97b9ed 1 1 // Test our new cfa_linkonce attribute: 2 2 3 __attribute__(( cfa_linkonce )) signed int example = -7;3 __attribute__(( cfa_linkonce )) signed int example = 7; 4 4 __attribute__(( cfa_linkonce )) unsigned int example = 12; 5 5 -
tests/link-once/partner.cfa
r946a6e4 ra97b9ed 1 1 // Side file for the link-once test. 2 2 3 __attribute__(( cfa_linkonce )) signed int example = -7;3 __attribute__(( cfa_linkonce )) signed int example = 7; 4 4 __attribute__(( cfa_linkonce )) unsigned int example = 12; 5 5 -
tests/test.py
r946a6e4 ra97b9ed 125 125 parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='') 126 126 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously, 0 (default) for unlimited', nargs='?', const=0, type=int) 127 parser.add_argument('--list-comp', help='List all valid earguments', action='store_true')127 parser.add_argument('--list-comp', help='List all valid arguments', action='store_true') 128 128 parser.add_argument('--list-dist', help='List all tests for distribution', action='store_true') 129 129 parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All if omitted', action='append')
Note:
See TracChangeset
for help on using the changeset viewer.