Changeset 2142


Ignore:
Timestamp:
May 23, 2012, 5:22:31 PM (7 years ago)
Author:
ksherdy
Message:

Added general description to multithreads template.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/pablo_template_multithreads.cpp

    r1906 r2142  
     1/*
     2
     3* OVERALL
     4
     5Coarse grained software pipeline implementation
     6of xmlwf application using the pthreads library.
     7
     8xmlwf template logic manually partitioned into four hard coded stages. A stage
     9implements a portion of the logic of the xmlwf application logic. A stage is broken
     10into a number of segment size passes. A pass executes a number of blocks. 
     11Passes are manually balanced and execute under separate threads.
     12
     13Circular queue implementation. Each queue entry contains a 'SEGMENT' of
     14parallel data 'stream' structs. The source buffer is a member of the set of
     15parallel data structs. Circular queue implemented as hard coded circular
     16queue of size 8.
     17
     18* SYNCHRONIZATION
     19
     20A pass can progress up to the minimum of tail of the (8 segment) circular queue
     21or the prior segment of the previous stage.
     22
     23BUFFER MANAGMENT / FILE MANAGEMENT
     24
     25Two buffers: Overlap buffer, Source buffer.
     26
     27Source Buffer Size: BLOCK_SIZE * (SEGMENT_BLOCKS+1) + OVERLAP_BUFSIZE*2
     28
     29Source Buffer Layout per Circular Queue Entry:
     30
     31| OVERLAP_BUFSIZE (16 bytes) | OVERLAP_BUFSIZE (16 bytes) | (BLOCK_SIZE * (SEGMENT_BLOCKS+1)) |
     32^                            ^
     33|                            |
     34srcbuf                       srcptr 
     35
     36Overlap Buffer Layout:
     37
     38| OVERLAP_BUFSIZE * 2 (32 bytes)                          |
     39
     40
     41* PROCESSING MODEL
     42
     43Slurps complete XML file.
     44
     45Counts the number of complete file segments.
     46
     47Creates thread for each stage.
     48
     49Threads process multiple segments as passes of a stage.
     50
     51*/
     52
     53
    154#include <stdio.h>
    255#include <stdlib.h>
Note: See TracChangeset for help on using the changeset viewer.