Changes between Version 20 and Version 21 of user_applications


Ignore:
Timestamp:
Jan 19, 2016, 1:58:30 PM (8 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • user_applications

    v20 v21  
    5757pthread_join() function to detect application completion. All others threads are executing the execute() function. Each execute() function is handling exactly (image_size / nthreads) lines.
    5858
    59 The input and output buffers containing the source and transposed images are allocated from the user heap distributed in all clusters. There is (image size / clusters) lines per cluster. Therefore, the data read are mostly local, but the data write are mostly remote.
    60 
    61 The number of clusters  must be a power of 2 no larger than 256.
    62 The number of processors per cluster must be a power of 2 no larger than 4.
     59The buf_in[x,y] and buf_out[x,y] buffers containing the direct ans transposed images are distributed in clusters:
     60In each cluster[x,y], the thread running on processor P[x,y,0] uses the giet_fat_mmap() function to map the buf_in[x,y] and buf_out[x,y] buffers containing a set of lines.
     61Then, all threads in cluster[x,y] read pixels from the local buf_in[x,y] buffer, and write the pixels to the remote buf_out[x,y] buffers. Finally, each thread display
     62a part of the transposed image to the frame buffer. There is (image size / clusters) lines per cluster. Therefore, the data read are local, but the data write are mostly remote.
     63
     64 * The image size must fit the frame buffer width and height, that must be power of 2.
     65 * The number of clusters  must be a power of 2 no larger than 256.
     66 * The number of processors per cluster must be a power of 2 no larger than 4.
     67 * The number of clusters cannot be larger than (image_size * image_size) / 4096, because the size of buf_in[x,y] and buf_out[x,y] must be multiple of 4096.
    6368
    6469It requires one TTY terminal, shared by all threads.
    6570
    6671The source code can be found [source:soft/giet_vm/applications/transpose/transpose.c here], and the mapping is defined  [source:soft/giet_vm/applications/transpose/transpose.py here].
     72
     73The [source:soft/giet_vm_applications/transpose/transpose_rw.c transpose.c] file contains a variant that use the giet_fat_read() and giet_fat_write() system calls, to access the files.
    6774
    6875== __convol__ ==