/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/matlab/normxcorr_hw.c

  • Committer: Suren A. Chilingaryan
  • Date: 2010-04-17 07:43:38 UTC
  • Revision ID: csa@dside.dyndns.org-20100417074338-l45lxndn5tv72bpx
Patches for windows port

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <stdio.h>
2
2
#include <stdlib.h>
3
 
#include <sys/time.h>
4
3
 
5
4
#include <mex.h>
6
5
#include <dict_hw.h>
7
6
 
 
7
#if defined(_WIN32) || defined(_WIN64)
 
8
# include <windows.h>
 
9
    typedef UINT8 uint8_t;
 
10
    typedef UINT16 uint16_t;
 
11
    typedef UINT32 uint32_t;
 
12
    typedef UINT64 uint64_t;
 
13
    typedef INT8 int8_t;
 
14
    typedef INT16 int16_t;
 
15
    typedef INT32 int32_t;
 
16
    typedef INT64 int64_t;
 
17
#else
 
18
# include <stdint.h>
 
19
#endif
 
20
 
8
21
#include "normxcorr_hw_msg.h"
9
22
 
10
23
#define MAX_FILE_NAME 2048
63
76
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
64
77
    int err;
65
78
 
 
79
    int i;
66
80
    mxArray *idMatrix;
67
81
    int32_t *idPtr;
68
82
    int64_t *errPtr;
148
162
 
149
163
    ps = pstate;
150
164
 
151
 
    action = (TAction)int(mxGetScalar((mxArray*)prhs[1]));
 
165
    action = (TAction)(mxGetScalar((mxArray*)prhs[1]));
152
166
 
153
167
//    reportMessage("Executing normxcorr_hw action: %u", action);
154
168
 
190
204
                    return;
191
205
                }
192
206
                
193
 
                for (int i = 0; i < length; i++) {
 
207
                for (i = 0; i < length; i++) {
194
208
                    if (chars[i] > 255) {
195
209
                        reportError("Unicode file names are not supported yet");
196
210
                        return;
246
260
                    return;
247
261
                }
248
262
                
249
 
                for (int i = 0; i < length; i++) {
 
263
                for (i = 0; i < length; i++) {
250
264
                    if (chars[i] > 255) {
251
265
                        reportError("Unicode file names are not supported yet");
252
266
                        return;