Templated Belief Propagation. More...
#include <cudabelieft.h>
Public Member Functions | |
| CudaBelief (int w, int h, bool copyFromHost=true) | |
| Constructor. | |
| void | Execute (float **priors, float **beliefs, float *costh_d, float *costv_d) |
| Execute Belief propagation on GPU. | |
| void | Execute (float **priors, float **beliefs, float *costh_d, float *costv_d, int loops, int depth) |
| Execute Belief propagation on GPU. | |
| ~CudaBelief () | |
Private Member Functions | |
| void | CollectMessages (float *costh_d, float *costv_d, int loop) |
| Collect the messages send from node to node. | |
| void | ComputeBeliefs (int loop) |
| Execute Belief Propagation. | |
Private Attributes | |
| unsigned char * | allocated_d |
| Allocated space on GPU. | |
| float * | belief_d [dim] |
| bool | copyFromHost |
| Whether or not to allocate space on GPU. | |
| int | height |
| float * | msgd_d [2 *dim] |
| float * | msgl_d [2 *dim] |
| Messages to left and right. | |
| float * | msgr_d [2 *dim] |
| float * | msgu_d [2 *dim] |
| Messages to top and bottom. | |
| float * | prior_d [dim] |
| Space for priors and beliefs. | |
| int | width |
| Image size. | |
Templated Belief Propagation.
Templated Belief Propagation given a foreground object id
| dim | ID of foreground object |
Definition at line 42 of file cudabelieft.h.
| CudaBelief< dim >::CudaBelief | ( | int | w, |
| int | h, | ||
| bool | copyFromHost = true |
||
| ) |
| CudaBelief< dim >::~CudaBelief | ( | ) |
| void CudaBelief< dim >::CollectMessages | ( | float * | costh_d, |
| float * | costv_d, | ||
| int | loop | ||
| ) | [private] |
Collect the messages send from node to node.
Collect the messages send from node to node
| costh_d | Space for horizontal messages (left and right) |
| costv_d | Space for vertical messages (top and bottom) |
| loop | Loop id |
| void CudaBelief< dim >::ComputeBeliefs | ( | int | loop | ) | [private] |
Execute Belief Propagation.
Execute Loopy Belief Propagation on GPU for some iterations
| loop | Number of iterations |
| void CudaBelief< dim >::Execute | ( | float ** | priors, |
| float ** | beliefs, | ||
| float * | costh_d, | ||
| float * | costv_d | ||
| ) |
Execute Belief propagation on GPU.
Execute Belief propagation on GPU
| priors | Prior probabilities |
| beliefs | Space for beliefs |
| costh_d | Horizontal costs |
| costv_d | Vertical costs |
| void CudaBelief< dim >::Execute | ( | float ** | priors, |
| float ** | beliefs, | ||
| float * | costh_d, | ||
| float * | costv_d, | ||
| int | loops, | ||
| int | depth | ||
| ) |
Execute Belief propagation on GPU.
Execute Belief propagation on GPU
| priors | Prior probabilities |
| beliefs | Space for beliefs |
| costh_d | Horizontal costs |
| costv_d | Vertical costs |
| loops | Number of iterations |
| depth | Depth of propagation |
unsigned char* CudaBelief< dim >::allocated_d [private] |
Allocated space on GPU.
Definition at line 47 of file cudabelieft.h.
float * CudaBelief< dim >::belief_d[dim] [private] |
Definition at line 53 of file cudabelieft.h.
bool CudaBelief< dim >::copyFromHost [private] |
Whether or not to allocate space on GPU.
Definition at line 45 of file cudabelieft.h.
int CudaBelief< dim >::height [private] |
Definition at line 55 of file cudabelieft.h.
float * CudaBelief< dim >::msgd_d[2 *dim] [private] |
Definition at line 51 of file cudabelieft.h.
float* CudaBelief< dim >::msgl_d[2 *dim] [private] |
Messages to left and right.
Definition at line 49 of file cudabelieft.h.
float * CudaBelief< dim >::msgr_d[2 *dim] [private] |
Definition at line 49 of file cudabelieft.h.
float* CudaBelief< dim >::msgu_d[2 *dim] [private] |
Messages to top and bottom.
Definition at line 51 of file cudabelieft.h.
float* CudaBelief< dim >::prior_d[dim] [private] |
Space for priors and beliefs.
Definition at line 53 of file cudabelieft.h.
int CudaBelief< dim >::width [private] |
Image size.
Definition at line 55 of file cudabelieft.h.