UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
ldgm-session-gpu.h
Go to the documentation of this file.
1/*
2 * =====================================================================================
3 *
4 * Filename: ldgm-session-gpu.h
5 *
6 * Description: GPU implementation fo LDGM coding
7 *
8 * Version: 1.0
9 * Created: 04/12/2012 12:54:51 PM
10 * Revision: none
11 * Compiler: gcc
12 *
13 * Authors: Milan Kabat (kabat@ics.muni.cz), Vojtech David (374572@mail.muni.cz)
14 * Organization:
15 *
16 * =====================================================================================
17 */
18
19
20#ifndef LDGM_SESSION_GPU_INC
21#define LDGM_SESSION_GPU_INC
22
23#include <string.h>
24#include "ldgm-session.h"
25
26#include <map>
27#include <queue>
28
29/*
30 * =====================================================================================
31 * Class: LDGM_session_gpu
32 * Description:
33 * =====================================================================================
34 */
36{
37 public:
38
39 // int * error_vec;
40 // int * sync_vec;
41
42 // int * ERROR_VEC;
43 // int * SYNC_VEC;
44
45
46
47 /* ==================== LIFECYCLE ======================================= */
48 LDGM_session_gpu (); /* constructor */
49 LDGM_session_gpu ( const LDGM_session_gpu &other ); /* copy constructor */
50 ~LDGM_session_gpu (); /* destructor */
51
52 /* ==================== ACCESSORS ======================================= */
53
54 /* ==================== MUTATORS ======================================= */
55
56 /* ==================== OPERATORS ======================================= */
57
58 void
59 encode ( char* data_ptr, char* parity_ptr );
60
61 void
62 encode_naive ( char* /* data_ptr */, char* /* parity_ptr */ ) {}
63
64 void
66
67 void
68 free_out_buf (char *buf);
69
70 void *
71 alloc_buf(int size);
72
73 char * decode_frame ( char* received_data, int buf_size, int* frame_size, std::map<int, int> valid_data );
74 void set_data_fname(char fname[32]) { strncpy(data_fname, fname, 32); }
75
76 protected:
77 /* ==================== DATA MEMBERS ======================================= */
78
79 private:
80 /* ==================== DATA MEMBERS ======================================= */
81 char data_fname[32];
82
83 std::queue<char *> freeBuffers;
84 std::map<char *, size_t> bufferSizes;
85
87 int * OUTBUF;
88
89 int * error_vec;
90 int * sync_vec;
91
92 int * SYNC_VEC;
93 int * ERROR_VEC;
94
95 int * PCM;
96
97
98
99}; /* ----- end of class LDGM_session_gpu ----- */
100
101#endif /* ----- #ifndef LDGM_SESSION_GPU_INC ----- */
void set_data_fname(char fname[32])
std::map< char *, size_t > bufferSizes
char * decode_frame(char *received_data, int buf_size, int *frame_size, std::map< int, int > valid_data)
LDGM_session_gpu(const LDGM_session_gpu &other)
void encode(char *data_ptr, char *parity_ptr)
void free_out_buf(char *buf)
std::queue< char * > freeBuffers
void encode_naive(char *, char *)
void * alloc_buf(int size)
Parent class for CPU and GPU implementations of LDGM coding.