/normxcorr/trunk

To get this branch, use:
bzr branch http://suren.me/webbzr/normxcorr/trunk

« back to all changes in this revision

Viewing changes to dict_hw/src/validate.cpp

  • Committer: Suren A. Chilingaryan
  • Date: 2010-04-25 04:39:54 UTC
  • Revision ID: csa@dside.dyndns.org-20100425043954-v7xm2bzohickyl9z
Multi-GPU support

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#include "dict_hw.h"
6
6
#include "normxcorr_hw.h"
7
7
 
8
 
int dictGetCorrelations(DICTContext ps, int icp, float *res) {
 
8
int dictGetCorrelations(ProcessingState ps, int icp, float *res) {
9
9
    int size = ps->fft_size;
10
10
    int size2 = size * size;
11
11
 
16
16
    return 0;
17
17
}
18
18
 
19
 
int dictGetCorrections(DICTContext ps, float *res_x, float *res_y) {
 
19
int dictGetCorrections(ProcessingState ps, float *res_x, float *res_y) {
20
20
    int ncp = ps->ncp;
 
21
    int points_alloc = ps->points_alloc_size;
21
22
    int ncp_alloc = ps->ncp_alloc_size;
22
23
 
23
 
    float *move_x = ps->points + 6 * ncp_alloc;
24
 
    float *move_y = move_x + ncp_alloc;
 
24
    float *move_x = ps->points + 6 * points_alloc;
 
25
    float *move_y = move_x + points_alloc;
25
26
 
26
27
    cudaMemcpy2D(
27
 
        move_x, ncp_alloc * sizeof(float),
 
28
        move_x, points_alloc * sizeof(float),
28
29
        ps->cuda_points, ncp_alloc * sizeof(float),
29
30
        ps->ncp * sizeof(float), 2,
30
31
        cudaMemcpyDeviceToHost
36
37
    return 0;
37
38
}
38
39
 
39
 
int dictGetLocalSum(DICTContext ps, int icp, float *lsum, float *denom) {
 
40
int dictGetLocalSum(ProcessingState ps, int icp, float *lsum, float *denom) {
40
41
    int size = ps->fft_size;
41
42
    int size2 = size*size;
42
43
    int alloc_size = ps->fft_alloc_size;