Coverage Report

Created: 2021-09-21 22:26

/home/liu/buildslave/linux-x64-runtests/build/lib/ccv.h
Line
Count
Source (jump to first uncovered line)
1
/**********************************************************
2
 * C-based/Cached/Core Computer Vision Library
3
 * Liu Liu, 2010-02-01
4
 **********************************************************/
5
6
#ifndef GUARD_ccv_h
7
#define GUARD_ccv_h
8
9
#define _WITH_GETLINE
10
#include <stdio.h>
11
#include <stdlib.h>
12
#include <stdarg.h>
13
#include <string.h>
14
#include <float.h>
15
#include <math.h>
16
#include <assert.h>
17
#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
18
#include <alloca.h>
19
#endif
20
21
122k
#define CCV_PI (3.141592653589793)
22
9.65M
#define ccmalloc malloc
23
288k
#define cccalloc calloc
24
6.83M
#define ccrealloc realloc
25
7.93M
#define ccfree free
26
27
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
28
#include <sys/param.h>
29
#if defined(__APPLE__) || defined(BSD) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
30
55.8k
#define ccmemalign posix_memalign
31
#else
32
#define ccmemalign(memptr, alignment, size) (*memptr = memalign(alignment, size))
33
#endif
34
#else
35
#define ccmemalign(memptr, alignment, size) (*memptr = ccmalloc(size))
36
#endif
37
38
// Include toll-free bridging for ccv_nnc_tensor_t
39
#define CCV_NNC_TENSOR_TFB (1)
40
#include "nnc/ccv_nnc_tfb.h"
41
42
/* Doxygen will ignore these, otherwise it has problem to process warn_unused_result directly. */
43
#define CCV_WARN_UNUSED(x) x __attribute__((warn_unused_result))
44
45
enum {
46
  CCV_8U  = 0x01000,
47
  CCV_32S = 0x02000,
48
  CCV_32F = 0x04000,
49
  CCV_64S = 0x08000,
50
  CCV_64F = 0x10000,
51
  CCV_16F = 0x20000, // We can still squeeze in 2 more types. (0xFF000 are for data types).
52
};
53
54
enum {
55
  CCV_C1 = 0x001,
56
  CCV_C2 = 0x002,
57
  CCV_C3 = 0x003,
58
  CCV_C4 = 0x004,
59
};
60
61
static const int _ccv_get_data_type_size[] = {
62
  -1, 1, 4,
63
  -1, 4,
64
  -1, -1, -1, 8,
65
  -1, -1, -1, -1, -1, -1, -1, 8,
66
  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2
67
};
68
69
226M
#define CCV_GET_DATA_TYPE(x) ((
x348
) & 0xFF000)
70
218M
#define CCV_GET_DATA_TYPE_SIZE(x) _ccv_get_data_type_size[CCV_GET_DATA_TYPE(x) >> 12]
71
134k
#define CCV_MAX_CHANNEL (0xFFF)
72
226M
#define CCV_GET_CHANNEL(x) ((x) & 0xFFF)
73
3.34M
#define CCV_GET_STEP(cols, type) (((cols) * CCV_GET_DATA_TYPE_SIZE(type) * CCV_GET_CHANNEL(type) + 3) & -4)
74
295k
#define CCV_ALL_DATA_TYPE (CCV_8U | CCV_32S | CCV_32F | CCV_64S | CCV_64F)
75
76
enum {
77
  CCV_MATRIX_DENSE  = 0x00100000,
78
  CCV_MATRIX_SPARSE = 0x00200000,
79
  CCV_MATRIX_CSR    = 0x00400000,
80
  CCV_MATRIX_CSC    = 0x00800000,
81
};
82
83
enum {
84
  CCV_GARBAGE       = 0x80000000, // matrix is in cache (not used by any functions)
85
  CCV_REUSABLE      = 0x40000000, // matrix can be recycled
86
  CCV_UNMANAGED     = 0x20000000, // matrix is allocated by user, therefore, cannot be freed by ccv_matrix_free/ccv_matrix_free_immediately
87
  CCV_NO_DATA_ALLOC = 0x10000000, // matrix is allocated as header only, but with no data section, therefore, you have to free the data section separately
88
  CCV_TAPE_ALLOC    = 0x08000000, // matrix is allocated on a tape.
89
  CCV_PINNED_MEM    = 0x04000000, // matrix is pinned in CUDA.
90
};
91
92
2.17k
#define CCV_GET_TAPE_ALLOC(type) ((type) & CCV_TAPE_ALLOC)
93
94
enum {
95
  CCV_DENSE_VECTOR  = 0x02000000,
96
  CCV_SPARSE_VECTOR = 0x01000000,
97
};
98
99
typedef struct {
100
  uint8_t ifbit;
101
  uint32_t i;
102
} ccv_sparse_matrix_index_t;
103
104
typedef struct {
105
  int step;
106
  int prime_index;
107
  uint32_t size;
108
  uint32_t rnum;
109
  union {
110
    ccv_sparse_matrix_index_t* index;
111
    ccv_numeric_data_t data;
112
  };
113
} ccv_sparse_matrix_vector_t;
114
115
enum {
116
  CCV_SPARSE_ROW_MAJOR = 0x00,
117
  CCV_SPARSE_COL_MAJOR = 0x01,
118
};
119
120
typedef struct {
121
  int type;
122
  int refcount;
123
  uint64_t sig;
124
  int rows;
125
  int cols;
126
  int major;
127
  int prime_index;
128
  uint32_t size;
129
  uint32_t rnum;
130
  union {
131
    unsigned char u8;
132
    int i32;
133
    float f32;
134
    int64_t i64;
135
    double f64;
136
    void* p;
137
  } tb;
138
  ccv_sparse_matrix_index_t* index;
139
  ccv_sparse_matrix_vector_t* vector;
140
} ccv_sparse_matrix_t;
141
142
typedef void ccv_matrix_t;
143
144
/**
145
 * @defgroup ccv_cache cache mechanism
146
 * This class implements a trie-based LRU cache that is then used for ccv application-wide cache in [ccv_memory.c](/lib/ccv-memory).
147
 * @{
148
 */
149
150
typedef void(*ccv_cache_index_free_f)(void*);
151
152
typedef union {
153
  struct {
154
    uint64_t bitmap;
155
    uint64_t set;
156
    uint64_t age;
157
  } branch;
158
  struct {
159
    uint64_t sign;
160
    uint64_t off;
161
    uint64_t type;
162
  } terminal;
163
} ccv_cache_index_t;
164
165
typedef struct {
166
  ccv_cache_index_t origin;
167
  uint32_t rnum;
168
  uint32_t age;
169
  size_t up;
170
  size_t size;
171
  ccv_cache_index_free_f ffree[16];
172
} ccv_cache_t;
173
174
/* I made it as generic as possible */
175
176
/**
177
 * Setup a cache strcture to work with.
178
 * @param cache The allocated cache.
179
 * @param up The upper limit of cache size in bytes.
180
 * @param cache_types The number of cache types in this one cache instance.
181
 * @param ffree The function that will be used to free cached object.
182
 */
183
void ccv_cache_init(ccv_cache_t* cache, size_t up, int cache_types, ccv_cache_index_free_f ffree, ...);
184
/**
185
 * Get an object from cache for its signature. 0 if cannot find the object.
186
 * @param cache The cache.
187
 * @param sign The signature.
188
 * @param type The type of the object.
189
 * @return The pointer to the object.
190
 */
191
void* ccv_cache_get(ccv_cache_t* cache, uint64_t sign, uint8_t* type);
192
/**
193
 * Put an object to cache with its signature, size, and type
194
 * @param cache The cache.
195
 * @param sign The signature.
196
 * @param x The pointer to the object.
197
 * @param size The size of the object.
198
 * @param type The type of the object.
199
 * @return 0 - success, 1 - replace, -1 - failure.
200
 */
201
int ccv_cache_put(ccv_cache_t* cache, uint64_t sign, void* x, uint32_t size, uint8_t type);
202
/**
203
 * Get an object from cache for its signature and then remove that object from the cache. 0 if cannot find the object.
204
 * @param cache The cache.
205
 * @param sign The signature.
206
 * @param type The type of the object.
207
 * @return The pointer to the object.
208
 */
209
void* ccv_cache_out(ccv_cache_t* cache, uint64_t sign, uint8_t* type);
210
/**
211
 * Delete an object from cache for its signature and free it.
212
 * @param cache The cache.
213
 * @param sign The signature.
214
 * @return -1 if cannot find the object, otherwise return 0.
215
 */
216
int ccv_cache_delete(ccv_cache_t* cache, uint64_t sign);
217
/**
218
 * Clean up the cache, free all objects inside and other memory space occupied.
219
 * @param cache The cache.
220
 */
221
void ccv_cache_cleanup(ccv_cache_t* cache);
222
/**
223
 * For current implementation (trie-based LRU cache), it is an alias for ccv_cache_cleanup.
224
 * @param cache The cache.
225
 */
226
void ccv_cache_close(ccv_cache_t* cache);
227
/** @} */
228
229
/* deprecated methods, often these implemented in another way and no longer suitable for newer computer architecture */
230
/* 0 */
231
232
typedef struct {
233
  int type;
234
  int refcount;
235
  uint64_t sig;
236
  int rows;
237
  int cols;
238
  int nnz;
239
  union {
240
    unsigned char u8;
241
    int i32;
242
    float f32;
243
    int64_t i64;
244
    double f64;
245
    void* p;
246
  } tb;
247
  int* index;
248
  int* offset;
249
  ccv_numeric_data_t data;
250
} ccv_compressed_sparse_matrix_t;
251
252
170M
#define ccv_clamp(x, a, b) ({ typeof (a) _a = (
a296k
); typeof (b) _b = (
b296k
); typeof (x) _x = (
x0
); (_x < _a) ?
_a89.6k
:
((_x > _b) ? 170M
_b127k
:
_x170M
); })
253
561M
#define ccv_min(a, b) ({ typeof (a) _a = (a); typeof (b) _b = (
b60
); (_a < _b) ?
_a270M
:
_b291M
; })
254
490M
#define ccv_max(a, b) ({ typeof (a) _a = (
a300k
); typeof (b) _b = (
b1.00M
); (_a > _b) ?
_a271M
:
_b219M
; })
255
256
/**
257
 * @defgroup ccv_memory memory alloc/dealloc
258
 * @{
259
 */
260
5.74M
#define ccv_compute_dense_matrix_size(rows, cols, type) (((sizeof(ccv_dense_matrix_t) + 15) & -16) + (((cols) * CCV_GET_DATA_TYPE_SIZE(type) * CCV_GET_CHANNEL(type) + 3) & -4) * (rows))
261
/**
262
 * Check the input matrix, if it is the allowed type, return it, otherwise create one with prefer_type.
263
 * @param x The matrix to check.
264
 * @param rows Rows of the matrix.
265
 * @param cols Columns of the matrix.
266
 * @param types Allowed types, it can be a mask of multiple types, e.g. CCV_8U | CCV_32S allows both 8-bit unsigned integer type and 32-bit signed integer type.
267
 * @param prefer_type The default type, it can be only one type.
268
 * @param sig The signature, using 0 if you don't know what it is.
269
 * @return The returned matrix object that satisfies the requirements.
270
 */
271
CCV_WARN_UNUSED(ccv_dense_matrix_t*) ccv_dense_matrix_renew(ccv_dense_matrix_t* x, int rows, int cols, int types, int prefer_type, uint64_t sig);
272
/**
273
 * Create a dense matrix with rows, cols, and type.
274
 * @param rows Rows of the matrix.
275
 * @param cols Columns of the matrix.
276
 * @param type Matrix supports 4 data types - CCV_8U, CCV_32S, CCV_64S, CCV_32F, CCV_64F and up to 255 channels. e.g. CCV_32F | 31 will create a matrix with float (32-bit float point) data type with 31 channels (the default type for ccv_hog).
277
 * @param data If 0, ccv will create the matrix by allocating memory itself. Otherwise, it will use the memory region referenced by 'data'.
278
 * @param sig The signature, using 0 if you don't know what it is.
279
 * @return The newly created matrix object.
280
 */
281
CCV_WARN_UNUSED(ccv_dense_matrix_t*) ccv_dense_matrix_new(int rows, int cols, int type, void* data, uint64_t sig);
282
/**
283
 * This method will return a dense matrix allocated on stack, with a data pointer to a custom memory region.
284
 * @param rows Rows of the matrix.
285
 * @param cols Columns of the matrix.
286
 * @param type The type of matrix.
287
 * @param data The data pointer that stores the actual matrix, it cannot be 0.
288
 * @param sig The signature, using 0 if you don't know what it is.
289
 * @return static matrix structs.
290
 */
291
ccv_dense_matrix_t ccv_dense_matrix(int rows, int cols, int type, void* data, uint64_t sig);
292
/**
293
 * Mark the current matrix as mutable. Under the hood, it will set matrix signature to 0, and mark the matrix as non-collectable.
294
 * @param mat The supplied matrix that will be marked as mutable.
295
 */
296
void ccv_make_matrix_mutable(ccv_matrix_t* mat);
297
/**
298
 * Mark the current matrix as immutable. Under the hood, it will generate a signature for the matrix, and mark it as non-collectable. For the convention, if the matrix is marked as immutable, you shouldn't change the content of the matrix, otherwise it will cause surprising behavior. If you want to change the content of the matrix, mark it as mutable first.
299
 * @param mat The supplied matrix that will be marked as immutable.
300
 **/
301
void ccv_make_matrix_immutable(ccv_matrix_t* mat);
302
/**
303
 * Create a sparse matrix. ccv uses a double hash table for memory-efficient and quick-access sparse matrix.
304
 * @param rows Rows of the matrix.
305
 * @param cols Columns of the matrix.
306
 * @param type The type of the matrix, the same as dense matrix.
307
 * @param major Either CCV_SPARSE_ROW_MAJOR or CCV_SPARSE_COL_MAJOR, it determines the underlying data structure of the sparse matrix (either using row or column as the first-level hash table).
308
 * @param sig The signature, using 0 if you don't know what it is.
309
 * @return The newly created sparse matrix object.
310
 */
311
CCV_WARN_UNUSED(ccv_sparse_matrix_t*) ccv_sparse_matrix_new(int rows, int cols, int type, int major, uint64_t sig);
312
/**
313
 * Skip garbage-collecting process and free the matrix immediately.
314
 * @param mat The matrix.
315
 */
316
void ccv_matrix_free_immediately(ccv_matrix_t* mat);
317
/**
318
 * In principal, you should always use this method to free a matrix. If you enabled cache in ccv, this method won't immediately free up memory space of the matrix. Instead, it will push the matrix to a cache if applicable so that if you want to create the same matrix again, ccv can shortcut the required matrix/image processing and return it from the cache.
319
 * @param mat The matrix.
320
 */
321
void ccv_matrix_free(ccv_matrix_t* mat);
322
323
#define CCV_SPARSE_FOREACH_X(mat, block, for_block) \
324
6.09k
  do { \
325
6.09k
    uint32_t _i_, _j_; \
326
6.09k
    const uint32_t _size_ = (mat)->size; \
327
6.09k
    __attribute__((unused)) const size_t _c_ = CCV_GET_CHANNEL((mat)->type); \
328
6.09k
    if ((mat)->type & CCV_DENSE_VECTOR) \
329
6.09k
    { \
330
398
      for (_i_ = 0; _i_ < _size_; 
_i_++397
) \
331
397
      { \
332
397
        ccv_sparse_matrix_index_t* const _idx_ = (mat)->index + _i_; \
333
397
        ccv_sparse_matrix_vector_t* const _v_ = (mat)->vector + _i_; \
334
397
        if (_idx_->ifbit <= 1 || 
!_v_->size182
) \
335
397
          
continue215
; \
336
182k
        
for (_j_ = 0; 182
_j_ < _v_->size;
_j_++182k
) \
337
182k
        { \
338
182k
          block(_idx_->i, _j_, _j_ * _c_, _v_->data, for_block); \
339
182k
        } \
340
182
      } \
341
6.09k
    } else { \
342
6.09k
      const size_t _idx_size_ = sizeof(ccv_sparse_matrix_index_t) + ((CCV_GET_DATA_TYPE_SIZE((mat)->type) * CCV_GET_CHANNEL((mat)->type) + 3) & -4); \
343
64.8k
      for (_i_ = 0; _i_ < _size_; 
_i_++58.7k
) \
344
58.7k
      { \
345
58.7k
        ccv_sparse_matrix_index_t* const _idx_ = (mat)->index + _i_; \
346
58.7k
        ccv_sparse_matrix_vector_t* const _v_ = (mat)->vector + _i_; \
347
58.7k
        if (_idx_->ifbit <= 1 || 
!_v_->rnum33.9k
) \
348
58.7k
          
continue24.8k
; \
349
58.7k
        uint8_t* const _vidx_ = (uint8_t*)_v_->index; \
350
144k
        for (_j_ = 0; _j_ < _v_->size; 
_j_++110k
) \
351
110k
        { \
352
110k
          ccv_sparse_matrix_index_t* const _idx_j_ = (ccv_sparse_matrix_index_t*)(_vidx_ + _idx_size_ * _j_); \
353
110k
          if (_idx_j_->ifbit <= 1) \
354
110k
            
continue52.2k
; \
355
110k
          ccv_numeric_data_t _d_ = { .u8 = (uint8_t*)(_idx_j_ + 1) }; \
356
58.2k
          block(_idx_->i, _idx_j_->i, 0, _d_, for_block); \
357
58.2k
        } \
358
33.9k
      } \
359
6.09k
    } \
360
6.09k
  } while (0)
361
0
#define _ccv_sparse_get_32s_vector_rmj(_i_, _j_, _k_, _v_, block) block((_i_), (_j_), (_v_.i32 + (_k_)))
362
182k
#define _ccv_sparse_get_32f_vector_rmj(_i_, _j_, _k_, _v_, block) block((_i_), (_j_), (_v_.f32 + (_k_)))
363
58.0k
#define _ccv_sparse_get_64s_vector_rmj(_i_, _j_, _k_, _v_, block) block((_i_), (_j_), (_v_.i64 + (_k_)))
364
0
#define _ccv_sparse_get_64f_vector_rmj(_i_, _j_, _k_, _v_, block) block((_i_), (_j_), (_v_.f64 + (_k_)))
365
0
#define _ccv_sparse_get_8u_vector_rmj(_i_, _j_, _k_, _v_, block) block((_i_), (_j_), (_v_.u8 + (_k_)))
366
0
#define _ccv_sparse_get_32s_vector_cmj(_i_, _j_, _k_, _v_, block) block((_j_), (_i_), (_v_.i32 + (_k_)))
367
200
#define _ccv_sparse_get_32f_vector_cmj(_i_, _j_, _k_, _v_, block) block((_j_), (_i_), (_v_.f32 + (_k_)))
368
0
#define _ccv_sparse_get_64s_vector_cmj(_i_, _j_, _k_, _v_, block) block((_j_), (_i_), (_v_.i64 + (_k_)))
369
0
#define _ccv_sparse_get_64f_vector_cmj(_i_, _j_, _k_, _v_, block) block((_j_), (_i_), (_v_.f64 + (_k_)))
370
0
#define _ccv_sparse_get_8u_vector_cmj(_i_, _j_, _k_, _v_, block) block((_j_), (_i_), (_v_.u8 + (_k_)))
371
/**
372
 * This method enables you to loop over non-zero (or assigned) positions in a sparse matrix.
373
 * @param mat The sparse matrix.
374
 * @param block(row, col, value) a macro to loop over, row, col is the position (depends on if it is row major or col major), value is the typed array.
375
 */
376
#define CCV_SPARSE_FOREACH(mat, block) \
377
6.09k
  do { if ((mat)->major & CCV_SPARSE_COL_MAJOR) 
{ switch (1
CCV_GET_DATA_TYPE1
((mat)->type)) { \
378
0
      case CCV_32S: { CCV_SPARSE_FOREACH_X(mat, _ccv_sparse_get_32s_vector_cmj, block); break; } \
379
200
      
case CCV_32F: { 1
CCV_SPARSE_FOREACH_X1
(mat, _ccv_sparse_get_32f_vector_cmj, block); break; } \
380
0
      case CCV_64S: { CCV_SPARSE_FOREACH_X(mat, _ccv_sparse_get_64s_vector_cmj, block); break; } \
381
0
      case CCV_64F: { CCV_SPARSE_FOREACH_X(mat, _ccv_sparse_get_64f_vector_cmj, block); break; } \
382
0
      default: { CCV_SPARSE_FOREACH_X(mat, _ccv_sparse_get_8u_vector_cmj, block); } } \
383
6.09k
    } else { switch (CCV_GET_DATA_TYPE((mat)->type)) { \
384
0
      case CCV_32S: { CCV_SPARSE_FOREACH_X(mat, _ccv_sparse_get_32s_vector_rmj, block); break; } \
385
182k
      
case CCV_32F: { 2
CCV_SPARSE_FOREACH_X2
(mat, _ccv_sparse_get_32f_vector_rmj, block); break; } \
386
58.0k
      
case CCV_64S: { 6.09k
CCV_SPARSE_FOREACH_X6.09k
(mat, _ccv_sparse_get_64s_vector_rmj, block); break; } \
387
0
      case CCV_64F: { CCV_SPARSE_FOREACH_X(mat, _ccv_sparse_get_64f_vector_rmj, block); break; } \
388
0
      default: { CCV_SPARSE_FOREACH_X(mat, _ccv_sparse_get_8u_vector_rmj, block); } } } \
389
6.09k
  } while (0)
390
391
#define CCV_SPARSE_VECTOR_FOREACH_X(mat, vector, block, for_block) \
392
125k
  do { \
393
125k
    int _i_; \
394
125k
    __attribute__((unused)) const size_t _c_ = CCV_GET_CHANNEL((mat)->type); \
395
125k
    if ((mat)->type & CCV_DENSE_VECTOR) \
396
125k
    { \
397
1.00k
      for (_i_ = 0; _i_ < (vector)->size; 
_i_++1.00k
) \
398
1.00k
      { \
399
1.00k
        block(_i_, _i_ * _c_, (vector)->data, for_block); \
400
1.00k
      } \
401
125k
    } else { \
402
125k
      const size_t _idx_size_ = sizeof(ccv_sparse_matrix_index_t) + ((CCV_GET_DATA_TYPE_SIZE((mat)->type) * CCV_GET_CHANNEL((mat)->type) + 3) & -4); \
403
125k
      uint8_t* const _vidx_ = (uint8_t*)(vector)->index; \
404
1.69M
      for (_i_ = 0; _i_ < (vector)->size; 
_i_++1.56M
) \
405
1.56M
      { \
406
1.56M
        ccv_sparse_matrix_index_t* const _idx_i_ = (ccv_sparse_matrix_index_t*)(_vidx_ + _idx_size_ * _i_); \
407
1.56M
        if (_idx_i_->ifbit <= 1) \
408
1.56M
          
continue643k
; \
409
1.56M
        ccv_numeric_data_t _d_ = { .u8 = (uint8_t*)(_idx_i_ + 1) }; \
410
925k
        block(_idx_i_->i, 0, _d_, for_block); \
411
925k
      } \
412
125k
    } \
413
125k
  } while (0)
414
925k
#define _ccv_sparse_get_32s_cell(_i_, _k_, _d_, block) block((_i_), (_d_.i32 + (_k_)))
415
1.04k
#define _ccv_sparse_get_32f_cell(_i_, _k_, _d_, block) block((_i_), (_d_.f32 + (_k_)))
416
0
#define _ccv_sparse_get_64s_cell(_i_, _k_, _d_, block) block((_i_), (_d_.i64 + (_k_)))
417
0
#define _ccv_sparse_get_64f_cell(_i_, _k_, _d_, block) block((_i_), (_d_.f64 + (_k_)))
418
14
#define _ccv_sparse_get_8u_cell(_i_, _k_, _d_, block) block((_i_), (_d_.u8 + (_k_)))
419
/**
420
 * This method enables you to loop over non-zero (or assigned) positions in one vector of a sparse matrix (you can use ccv_get_sparse_matrix_vector method)
421
 * @param mat The sparse matrix.
422
 * @param vector The vector within the sparse matrix.
423
 * @param block(index, value) a macro to loop over, index is the position (depends on if it is row major or col major), value is the typed array.
424
 */
425
#define CCV_SPARSE_VECTOR_FOREACH(mat, vector, block) \
426
125k
  do { switch (CCV_GET_DATA_TYPE((mat)->type)) { \
427
925k
      
case CCV_32S: { 125k
CCV_SPARSE_VECTOR_FOREACH_X125k
(mat, vector, _ccv_sparse_get_32s_cell, block); break; } \
428
1.04k
      
case CCV_32F: { 2
CCV_SPARSE_VECTOR_FOREACH_X2
(mat, vector, _ccv_sparse_get_32f_cell, block); break; } \
429
0
      case CCV_64S: { CCV_SPARSE_VECTOR_FOREACH_X(mat, vector, _ccv_sparse_get_64s_cell, block); break; } \
430
0
      case CCV_64F: { CCV_SPARSE_VECTOR_FOREACH_X(mat, vector, _ccv_sparse_get_64f_cell, block); break; } \
431
14
      
default: { 10
CCV_SPARSE_VECTOR_FOREACH_X10
(mat, vector, _ccv_sparse_get_8u_cell, block); } } \
432
125k
  } while (0)
433
434
/**
435
 * Generate a matrix signature based on input message and other signatures. This is the core method for ccv cache. In short, ccv does a given image processing by first generating an appropriate signature for that operation. It requires 1). an operation-specific message, which can be generated by concatenate the operation name and parameters. 2). the signature of input matrix(es). After that, ccv will look-up matrix in cache with the newly generated signature. If it exists, ccv will return that matrix and skip the whole operation.
436
 * @param msg The concatenated message.
437
 * @param len Message length.
438
 * @param sig_start The input matrix(es) signature, end the list with 0.
439
 * @return The generated 64-bit signature.
440
 */
441
uint64_t ccv_cache_generate_signature(const char* msg, int len, uint64_t sig_start, ...);
442
443
0
#define CCV_DEFAULT_CACHE_SIZE (1024 * 1024 * 64)
444
445
/**
446
 * Drain up the cache.
447
 */
448
void ccv_drain_cache(void);
449
/**
450
 * Drain up and disable the application-wide cache.
451
 */
452
void ccv_disable_cache(void);
453
/**
454
 * Enable a application-wide cache for ccv at default memory bound (64MiB).
455
 */
456
void ccv_enable_default_cache(void);
457
/**
458
 * Enable a application-wide cache for ccv. The cache is bounded by given memory size.
459
 * @param size The upper limit of the cache, in bytes.
460
 */
461
void ccv_enable_cache(size_t size);
462
463
#define ccv_get_dense_matrix_cell_by(type, x, row, col, ch) \
464
55
  (((type) & CCV_32S) ? 
(void*)((x)->data.i32 + ((row) * (x)->cols + (col)) * 1
CCV_GET_CHANNEL1
(type) + (ch)) : \
465
55
  
(((type) & CCV_32F) ? 54
(void*)((x)->data.f32+ ((row) * (x)->cols + (col)) * 31
CCV_GET_CHANNEL31
(type) + (ch)) : \
466
54
  
(((type) & CCV_64S) ? 23
(void*)((x)->data.i64+ ((row) * (x)->cols + (col)) * 0
CCV_GET_CHANNEL0
(type) + (ch)) : \
467
23
  (((type) & CCV_64F) ? 
(void*)((x)->data.f64 + ((row) * (x)->cols + (col)) * 5
CCV_GET_CHANNEL5
(type) + (ch)) : \
468
23
  
(void*)((x)->data.u8 + (row) * (x)->step + (col) * 18
CCV_GET_CHANNEL18
(type) + (ch))))))
469
470
55
#define ccv_get_dense_matrix_cell(x, row, col, ch) ccv_get_dense_matrix_cell_by((x)->type, x, row, col, ch)
471
472
/* this is for simplicity in code, I am sick of x->data.f64[i * x->cols + j] stuff, this is clearer, and compiler
473
 * can optimize away the if structures */
474
#define ccv_get_dense_matrix_cell_value_by(type, x, row, col, ch) \
475
0
  (((type) & CCV_32S) ? (x)->data.i32[((row) * (x)->cols + (col)) * CCV_GET_CHANNEL(type) + (ch)] : \
476
0
  (((type) & CCV_32F) ? (x)->data.f32[((row) * (x)->cols + (col)) * CCV_GET_CHANNEL(type) + (ch)] : \
477
0
  (((type) & CCV_64S) ? (x)->data.i64[((row) * (x)->cols + (col)) * CCV_GET_CHANNEL(type) + (ch)] : \
478
0
  (((type) & CCV_64F) ? (x)->data.f64[((row) * (x)->cols + (col)) * CCV_GET_CHANNEL(type) + (ch)] : \
479
0
  (x)->data.u8[(row) * (x)->step + (col) * CCV_GET_CHANNEL(type) + (ch)]))))
480
481
0
#define ccv_get_dense_matrix_cell_value(x, row, col, ch) ccv_get_dense_matrix_cell_value_by((x)->type, x, row, col, ch)
482
483
#define ccv_get_value(type, ptr, i) \
484
882
  (((type) & CCV_32S) ? 
((int*)(ptr))[(i)]0
: \
485
882
  (((type) & CCV_32F) ? 
((float*)(ptr))[(i)]0
: \
486
882
  (((type) & CCV_64S) ? 
((int64_t*)(ptr))[(i)]0
: \
487
882
  (((type) & CCV_64F) ? ((double*)(ptr))[(i)] : \
488
882
  
((unsigned char*)(ptr))[(i)]0
))))
489
490
338
#define ccv_set_value(type, ptr, i, value, factor) switch (CCV_GET_DATA_TYPE((type))) { \
491
0
  case CCV_32S: ((int*)(ptr))[(i)] = (int)(value) >> factor; break; \
492
0
  case CCV_32F: ((float*)(ptr))[(i)] = (float)value; break; \
493
0
  case CCV_64S: ((int64_t*)(ptr))[(i)] = (int64_t)(value) >> factor; break; \
494
2.62k
  
case CCV_64F: ((double*)(ptr))[(i)] = (double)338
value; break; \
495
0
  default: ((unsigned char*)(ptr))[(i)] = ccv_clamp((int)(value) >> factor, 0, 255); }
496
/** @} */
497
498
/**
499
 * @defgroup ccv_io basic IO utilities
500
 * @{
501
 */
502
503
enum {
504
  // modifier for converting to gray-scale
505
  CCV_IO_GRAY      = 0x100,
506
  // modifier for converting to color
507
  CCV_IO_RGB_COLOR = 0x300,
508
};
509
510
enum {
511
  // modifier for not copy the data over when read raw in-memory data
512
  CCV_IO_NO_COPY = 0x10000,
513
};
514
515
enum {
516
  // read self-describe in-memory data
517
  CCV_IO_ANY_STREAM     = 0x010,
518
  CCV_IO_BMP_STREAM     = 0x011,
519
  CCV_IO_JPEG_STREAM    = 0x012,
520
  CCV_IO_PNG_STREAM     = 0x013,
521
  CCV_IO_PLAIN_STREAM   = 0x014,
522
  CCV_IO_DEFLATE_STREAM = 0x015,
523
  // read self-describe on-disk data
524
  CCV_IO_ANY_FILE       = 0x020,
525
  CCV_IO_BMP_FILE       = 0x021,
526
  CCV_IO_JPEG_FILE      = 0x022,
527
  CCV_IO_PNG_FILE       = 0x023,
528
  CCV_IO_BINARY_FILE    = 0x024,
529
  // read not-self-describe in-memory data (a.k.a. raw data)
530
  // you need to specify rows, cols, or scanline for these data
531
  CCV_IO_ANY_RAW        = 0x040,
532
  CCV_IO_RGB_RAW        = 0x041,
533
  CCV_IO_RGBA_RAW       = 0x042,
534
  CCV_IO_ARGB_RAW       = 0x043,
535
  CCV_IO_BGR_RAW        = 0x044,
536
  CCV_IO_BGRA_RAW       = 0x045,
537
  CCV_IO_ABGR_RAW       = 0x046,
538
  CCV_IO_GRAY_RAW       = 0x047,
539
};
540
541
enum {
542
  CCV_IO_FINAL = 0x00,
543
  CCV_IO_CONTINUE,
544
  CCV_IO_ERROR,
545
  CCV_IO_ATTEMPTED,
546
  CCV_IO_UNKNOWN,
547
};
548
549
/**
550
 * @file ccv_doxygen.h
551
 * @fn int ccv_read(const char* in, ccv_dense_matrix_t** x, int type)
552
 * Read image from a file. This function has soft dependencies on [LibJPEG](http://libjpeg.sourceforge.net/) and [LibPNG](http://www.libpng.org/pub/png/libpng.html). No these libraries, no JPEG nor PNG read support. However, ccv does support BMP read natively (it is a simple format after all).
553
 * @param in The file name.
554
 * @param x The output image.
555
 * @param type CCV_IO_ANY_FILE, accept any file format. CCV_IO_GRAY, convert to grayscale image. CCV_IO_RGB_COLOR, convert to color image.
556
 */
557
/**
558
 * @fn int ccv_read(const void* data, ccv_dense_matrix_t** x, int type, int size)
559
 * Read image from a a region of memory that conforms a specific image format. This function has soft dependencies on [LibJPEG](http://libjpeg.sourceforge.net/) and [LibPNG](http://www.libpng.org/pub/png/libpng.html). No these libraries, no JPEG nor PNG read support. However, ccv does support BMP read natively (it is a simple format after all).
560
 * @param data The data memory.
561
 * @param x The output image.
562
 * @param type CCV_IO_ANY_STREAM, accept any file format. CCV_IO_GRAY, convert to grayscale image. CCV_IO_RGB_COLOR, convert to color image.
563
 * @param size The size of that data memory region.
564
 */
565
/**
566
 * @fn int ccv_read(const void* data, ccv_dense_matrix_t** x, int type, int rows, int cols, int scanline)
567
 * Read image from a region of memory that assumes specific layout (RGB, GRAY, BGR, RGBA, ARGB, RGBA, ABGR, BGRA). By default, this method will create a matrix and copy data over to that matrix. With CCV_IO_NO_COPY, it will create a matrix that has data block pointing to the original data memory region. It is your responsibility to release that data memory at an appropriate time after release the matrix.
568
 * @param data The data memory.
569
 * @param x The output image.
570
 * @param type CCV_IO_ANY_RAW, CCV_IO_RGB_RAW, CCV_IO_BGR_RAW, CCV_IO_RGBA_RAW, CCV_IO_ARGB_RAW, CCV_IO_BGRA_RAW, CCV_IO_ABGR_RAW, CCV_IO_GRAY_RAW. These in conjunction can be used with CCV_IO_NO_COPY.
571
 * @param rows How many rows in the given data memory region.
572
 * @param cols How many columns in the given data memory region.
573
 * @param scanline The size of a single column in the given data memory region (or known as "bytes per row").
574
 */
575
int ccv_read_impl(const void* in, ccv_dense_matrix_t** x, int type, int rows, int cols, int scanline);
576
#define ccv_read_n(in, x, type, rows, cols, scanline, ...) \
577
88
  ccv_read_impl(in, x, type, rows, cols, scanline)
578
#define ccv_read(in, x, type, ...) \
579
88
  ccv_read_n(in, x, type, ##__VA_ARGS__, 0, 0, 0)
580
// this is a way to implement function-signature based dispatch, you can call either
581
// ccv_read(in, x, type) or ccv_read(in, x, type, rows, cols, scanline)
582
// notice that you can implement this with va_* functions, but that is not type-safe
583
/**
584
 * Write image to a file. This function has soft dependencies on [LibJPEG](http://libjpeg.sourceforge.net/) and [LibPNG](http://www.libpng.org/pub/png/libpng.html). No these libraries, no JPEG nor PNG write support.
585
 * @param mat The input image.
586
 * @param out The file name.
587
 * @param len The output bytes.
588
 * @param type CCV_IO_PNG_FILE, save to PNG format. CCV_IO_JPEG_FILE, save to JPEG format.
589
 * @param conf configuration.
590
 */
591
int ccv_write(ccv_dense_matrix_t* mat, char* out, int* len, int type, void* conf);
592
/** @} */
593
594
/**
595
 * @defgroup ccv_algebra linear algebra
596
 * @{
597
 */
598
599
double ccv_trace(ccv_matrix_t* mat);
600
601
enum {
602
  CCV_L1_NORM  = 0x01, // |dx| + |dy|
603
  CCV_L2_NORM  = 0x02, // sqrt(dx^2 + dy^2)
604
  CCV_GSEDT    = 0x04, // Generalized Squared Euclidean Distance Transform:
605
             // a * dx + b * dy + c * dx^2 + d * dy^2, when combined with CCV_L1_NORM:
606
             // a * |dx| + b * |dy| + c * dx^2 + d * dy^2
607
  CCV_NEGATIVE = 0x08, // negative distance computation (from positive (min) to negative (max))
608
  CCV_POSITIVE = 0x00, // positive distance computation (the default)
609
};
610
611
enum {
612
  CCV_NO_PADDING = 0x00,
613
  CCV_PADDING_ZERO = 0x01,
614
  CCV_PADDING_EXTEND = 0x02,
615
  CCV_PADDING_MIRROR = 0x04,
616
};
617
618
enum {
619
  CCV_SIGNED = 0x00,
620
  CCV_UNSIGNED = 0x01,
621
};
622
623
double ccv_norm(ccv_matrix_t* mat, int type);
624
/**
625
 * Normalize a matrix and return the normalize factor.
626
 * @param a The input matrix.
627
 * @param b The output matrix.
628
 * @param btype The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
629
 * @param flag CCV_L1 or CCV_L2, for L1 or L2 normalization.
630
 * @return L1 or L2 sum.
631
 */
632
double ccv_normalize(ccv_matrix_t* a, ccv_matrix_t** b, int btype, int flag);
633
/**
634
 * Generate the [Summed Area Table](https://en.wikipedia.org/wiki/Summed_area_table).
635
 * @param a The input matrix.
636
 * @param b The output matrix.
637
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
638
 * @param padding_pattern CCV_NO_PADDING - the first row and the first column in the output matrix is the same as the input matrix. CCV_PADDING_ZERO - the first row and the first column in the output matrix is zero, thus, the output matrix size is 1 larger than the input matrix.
639
 */
640
void ccv_sat(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int padding_pattern);
641
/**
642
 * Dot product of two matrix.
643
 * @param a The input matrix.
644
 * @param b The other input matrix.
645
 * @return Dot product.
646
 */
647
double ccv_dot(ccv_matrix_t* a, ccv_matrix_t* b);
648
/**
649
 * Return the sum of all elements in the matrix.
650
 * @param mat The input matrix.
651
 * @param flag CCV_UNSIGNED - compute fabs(x) of the elements first and then sum up. CCV_SIGNED - compute the sum normally.
652
 */
653
double ccv_sum(ccv_matrix_t* mat, int flag);
654
/**
655
 * Return the sum of all elements in the matrix.
656
 * @param mat The input matrix.
657
 * @return Element variance of the input matrix.
658
 */
659
double ccv_variance(ccv_matrix_t* mat);
660
/**
661
 * Do element-wise matrix multiplication.
662
 * @param a The input matrix.
663
 * @param b The input matrix.
664
 * @param c The output matrix.
665
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
666
 */
667
void ccv_multiply(ccv_matrix_t* a, ccv_matrix_t* b, ccv_matrix_t** c, int type);
668
/**
669
 * Matrix addition.
670
 * @param a The input matrix.
671
 * @param b The input matrix.
672
 * @param c The output matrix.
673
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
674
 */
675
void ccv_add(ccv_matrix_t* a, ccv_matrix_t* b, ccv_matrix_t** c, int type);
676
/**
677
 * Matrix subtraction.
678
 * @param a The input matrix.
679
 * @param b The input matrix.
680
 * @param c The output matrix.
681
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
682
 */
683
void ccv_subtract(ccv_matrix_t* a, ccv_matrix_t* b, ccv_matrix_t** c, int type);
684
/**
685
 * Scale given matrix by factor of **ds**.
686
 * @param a The input matrix.
687
 * @param b The output matrix.
688
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
689
 * @param ds The scale factor, `b = a * ds`
690
 */
691
void ccv_scale(ccv_matrix_t* a, ccv_matrix_t** b, int type, double ds);
692
693
enum {
694
  CCV_A_TRANSPOSE = 0x01,
695
  CCV_B_TRANSPOSE = 0X02,
696
  CCV_C_TRANSPOSE = 0X04,
697
};
698
699
/**
700
 * General purpose matrix multiplication. This function has a hard dependency on [cblas](http://www.netlib.org/blas/) library.
701
 *
702
 * As general as it is, it computes:
703
 *
704
 *   alpha * A * B + beta * C
705
 *
706
 * whereas A, B, C are matrix, and alpha, beta are scalar.
707
 *
708
 * @param a The input matrix.
709
 * @param b The input matrix.
710
 * @param alpha The multiplication factor.
711
 * @param c The input matrix.
712
 * @param beta The multiplication factor.
713
 * @param transpose CCV_A_TRANSPOSE, CCV_B_TRANSPOSE to indicate if matrix A or B need to be transposed first before multiplication.
714
 * @param d The output matrix.
715
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
716
 */
717
void ccv_gemm(ccv_matrix_t* a, ccv_matrix_t* b, double alpha, ccv_matrix_t* c, double beta, int transpose, ccv_matrix_t** d, int type);
718
/** @} */
719
720
typedef struct {
721
  int left;
722
  int top;
723
  int right;
724
  int bottom;
725
} ccv_margin_t;
726
727
inline static ccv_margin_t ccv_margin(int left, int top, int right, int bottom)
728
1
{
729
1
  ccv_margin_t margin;
730
1
  margin.left = left;
731
1
  margin.top = top;
732
1
  margin.right = right;
733
1
  margin.bottom = bottom;
734
1
  return margin;
735
1
}
util.tests.c:ccv_margin
Line
Count
Source
728
1
{
729
1
  ccv_margin_t margin;
730
1
  margin.left = left;
731
1
  margin.top = top;
732
1
  margin.right = right;
733
1
  margin.bottom = bottom;
734
1
  return margin;
735
1
}
Unexecuted instantiation: basic.tests.c:ccv_margin
Unexecuted instantiation: memory.tests.c:ccv_margin
Unexecuted instantiation: transform.tests.c:ccv_margin
Unexecuted instantiation: image_processing.tests.c:ccv_margin
Unexecuted instantiation: 3rdparty.tests.c:ccv_margin
Unexecuted instantiation: algebra.tests.c:ccv_margin
Unexecuted instantiation: io.tests.c:ccv_margin
Unexecuted instantiation: gradient.tests.c:ccv_margin
Unexecuted instantiation: upsample.tests.c:ccv_margin
Unexecuted instantiation: concat.tests.c:ccv_margin
Unexecuted instantiation: tensor.bind.tests.c:ccv_margin
Unexecuted instantiation: backward.tests.c:ccv_margin
Unexecuted instantiation: graph.tests.c:ccv_margin
Unexecuted instantiation: case_of.backward.tests.c:ccv_margin
Unexecuted instantiation: while.backward.tests.c:ccv_margin
Unexecuted instantiation: autograd.vector.tests.c:ccv_margin
Unexecuted instantiation: dropout.tests.c:ccv_margin
Unexecuted instantiation: custom.tests.c:ccv_margin
Unexecuted instantiation: reduce.tests.c:ccv_margin
Unexecuted instantiation: tfb.tests.c:ccv_margin
Unexecuted instantiation: batch.norm.tests.c:ccv_margin
Unexecuted instantiation: crossentropy.tests.c:ccv_margin
Unexecuted instantiation: cnnp.core.tests.c:ccv_margin
Unexecuted instantiation: symbolic.graph.tests.c:ccv_margin
Unexecuted instantiation: case_of.tests.c:ccv_margin
Unexecuted instantiation: micro.tests.c:ccv_margin
Unexecuted instantiation: compression.tests.c:ccv_margin
Unexecuted instantiation: dataframe.tests.c:ccv_margin
Unexecuted instantiation: gemm.tests.c:ccv_margin
Unexecuted instantiation: roi_align.tests.c:ccv_margin
Unexecuted instantiation: swish.tests.c:ccv_margin
Unexecuted instantiation: index.tests.c:ccv_margin
Unexecuted instantiation: minimize.tests.c:ccv_margin
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_margin
Unexecuted instantiation: autograd.tests.c:ccv_margin
Unexecuted instantiation: tensor.tests.c:ccv_margin
Unexecuted instantiation: rand.tests.c:ccv_margin
Unexecuted instantiation: while.tests.c:ccv_margin
Unexecuted instantiation: nms.tests.c:ccv_margin
Unexecuted instantiation: graph.io.tests.c:ccv_margin
Unexecuted instantiation: cblas.tests.c:ccv_margin
Unexecuted instantiation: simplify.tests.c:ccv_margin
Unexecuted instantiation: numa.tests.c:ccv_margin
Unexecuted instantiation: tape.tests.c:ccv_margin
Unexecuted instantiation: dynamic.graph.tests.c:ccv_margin
Unexecuted instantiation: layer.norm.tests.c:ccv_margin
Unexecuted instantiation: parallel.tests.c:ccv_margin
Unexecuted instantiation: winograd.tests.c:ccv_margin
Unexecuted instantiation: dataframe.addons.tests.c:ccv_margin
Unexecuted instantiation: broadcast.tests.c:ccv_margin
Unexecuted instantiation: compare.tests.c:ccv_margin
Unexecuted instantiation: smooth_l1.tests.c:ccv_margin
Unexecuted instantiation: forward.tests.c:ccv_margin
Unexecuted instantiation: output.tests.c:ccv_margin
Unexecuted instantiation: convnet.tests.c:ccv_margin
Unexecuted instantiation: numeric.tests.c:ccv_margin
Unexecuted instantiation: defects.l0.1.tests.c:ccv_margin
Unexecuted instantiation: cublas.tests.c:ccv_margin
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_margin
Unexecuted instantiation: imdb.tests.c:ccv_margin
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_margin
Unexecuted instantiation: random.tests.c:ccv_margin
Unexecuted instantiation: cudnn.tests.c:ccv_margin
Unexecuted instantiation: dense.net.tests.c:ccv_margin
Unexecuted instantiation: cifar.tests.c:ccv_margin
Unexecuted instantiation: rmsprop.tests.c:ccv_margin
Unexecuted instantiation: sgd.tests.c:ccv_margin
Unexecuted instantiation: nccl.tests.c:ccv_margin
Unexecuted instantiation: schedule.tests.c:ccv_margin
Unexecuted instantiation: loss.tests.c:ccv_margin
Unexecuted instantiation: adam.tests.c:ccv_margin
Unexecuted instantiation: ccv_cache.c:ccv_margin
Unexecuted instantiation: ccv_memory.c:ccv_margin
Unexecuted instantiation: ccv_io.c:ccv_margin
Unexecuted instantiation: ccv_numeric.c:ccv_margin
Unexecuted instantiation: ccv_algebra.c:ccv_margin
Unexecuted instantiation: ccv_util.c:ccv_margin
Unexecuted instantiation: ccv_basic.c:ccv_margin
Unexecuted instantiation: ccv_image_processing.c:ccv_margin
Unexecuted instantiation: ccv_resample.c:ccv_margin
Unexecuted instantiation: ccv_transform.c:ccv_margin
Unexecuted instantiation: ccv_classic.c:ccv_margin
Unexecuted instantiation: ccv_convnet.c:ccv_margin
Unexecuted instantiation: ccv_output.c:ccv_margin
Unexecuted instantiation: cwc_convnet_ext.c:ccv_margin
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_margin
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_margin
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_margin
Unexecuted instantiation: ccv_nnc_stream.c:ccv_margin
Unexecuted instantiation: ccv_nnc_micro.c:ccv_margin
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_margin
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_margin
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_margin
Unexecuted instantiation: ccv_nnc_graph.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_margin
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_margin
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_margin
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_margin
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_margin
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_model.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_margin
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_margin
Unexecuted instantiation: co.c:ccv_margin
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_margin
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_margin
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_margin
Unexecuted instantiation: ccv_nnc_rand.c:ccv_margin
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_margin
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_margin
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_margin
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_margin
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_margin
Unexecuted instantiation: ccv_nnc_swish.c:ccv_margin
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_margin
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_margin
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_margin
Unexecuted instantiation: ccv_nnc_pool.c:ccv_margin
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_margin
Unexecuted instantiation: ccv_nnc_compression.c:ccv_margin
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_margin
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_margin
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_margin
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_margin
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_margin
Unexecuted instantiation: ccv_nnc_relu.c:ccv_margin
Unexecuted instantiation: ccv_nnc_adam.c:ccv_margin
Unexecuted instantiation: ccv_nnc_nms.c:ccv_margin
Unexecuted instantiation: ccv_nnc_blas.c:ccv_margin
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_margin
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_margin
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_margin
Unexecuted instantiation: ccv_nnc_comm.c:ccv_margin
Unexecuted instantiation: ccv_nnc_util.c:ccv_margin
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_margin
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_margin
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_margin
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_margin
Unexecuted instantiation: ccv_nnc_ew.c:ccv_margin
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_margin
Unexecuted instantiation: ccv_nnc_norm.c:ccv_margin
736
737
/* matrix build blocks / utility functions ccv_util.c */
738
/**
739
 * @defgroup ccv_util data structure utilities
740
 * @{
741
 */
742
743
/**
744
 * Check and get dense matrix from general matrix structure.
745
 * @param mat A general matrix.
746
 */
747
ccv_dense_matrix_t* ccv_get_dense_matrix(ccv_matrix_t* mat);
748
/**
749
 * Check and get sparse matrix from general matrix structure.
750
 * @param mat A general matrix.
751
 */
752
ccv_sparse_matrix_t* ccv_get_sparse_matrix(ccv_matrix_t* mat);
753
/**
754
 * Get vector for a sparse matrix.
755
 * @param mat The sparse matrix.
756
 * @param index The index of that vector.
757
 */
758
ccv_sparse_matrix_vector_t* ccv_get_sparse_matrix_vector(const ccv_sparse_matrix_t* mat, int index);
759
/**
760
 * Get cell for a vector of a sparse matrix.
761
 * @param mat The sparse matrix.
762
 * @param vector The vector.
763
 * @param index The index of the cell.
764
 */
765
ccv_numeric_data_t ccv_get_sparse_matrix_cell_from_vector(const ccv_sparse_matrix_t* mat, ccv_sparse_matrix_vector_t* vector, int index);
766
/**
767
 * Get cell from a sparse matrix.
768
 * @param mat The sparse matrix.
769
 * @param row The row index.
770
 * @param col The column index.
771
 */
772
ccv_numeric_data_t ccv_get_sparse_matrix_cell(const ccv_sparse_matrix_t* mat, int row, int col);
773
/**
774
 * Set cell for a sparse matrix.
775
 * @param mat The sparse matrix.
776
 * @param row The row index.
777
 * @param col The column index.
778
 * @param data The data pointer.
779
 */
780
void ccv_set_sparse_matrix_cell(ccv_sparse_matrix_t* mat, int row, int col, const void* data);
781
/**
782
 * Transform a sparse matrix into compressed representation.
783
 * @param mat The sparse matrix.
784
 * @param csm The compressed matrix.
785
 */
786
void ccv_compress_sparse_matrix(const ccv_sparse_matrix_t* mat, ccv_compressed_sparse_matrix_t** csm);
787
/**
788
 * Transform a compressed matrix into a sparse matrix.
789
 * @param csm The compressed matrix.
790
 * @param smt The sparse matrix.
791
 */
792
void ccv_decompress_sparse_matrix(const ccv_compressed_sparse_matrix_t* csm, ccv_sparse_matrix_t** smt);
793
/**
794
 * Offset input matrix by x, y.
795
 * @param a The input matrix.
796
 * @param b The output matrix.
797
 * @param btype The type of output matrix, if 0, ccv will use the input matrix type.
798
 * @param y b(0, 0) = a(x, y).
799
 * @param x b(0, 0) = a(x, y).
800
 */
801
void ccv_move(ccv_matrix_t* a, ccv_matrix_t** b, int btype, int y, int x);
802
/**
803
 * Compare if two matrix are equal (with type). Return 0 if it is.
804
 * @param a The input matrix a.
805
 * @param b The input matrix b.
806
 */
807
int ccv_matrix_eq(ccv_matrix_t* a, ccv_matrix_t* b);
808
/**
809
 * Slice an input matrix given x, y and row, column size.
810
 * @param a The input matrix.
811
 * @param b The output matrix.
812
 * @param btype The type of output matrix, if 0, ccv will use the input matrix type.
813
 * @param y y coordinate.
814
 * @param x x coordinate.
815
 * @param rows Row size of targeted matrix.
816
 * @param cols Column size of targeted matrix.
817
 */
818
void ccv_slice(ccv_matrix_t* a, ccv_matrix_t** b, int btype, int y, int x, int rows, int cols);
819
/**
820
 * Add border to the input matrix.
821
 * @param a The input matrix.
822
 * @param b The output matrix.
823
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
824
 * @param margin Left, top, right, bottom width for the border.
825
 */
826
void ccv_border(ccv_matrix_t* a, ccv_matrix_t** b, int type, ccv_margin_t margin);
827
/**
828
 * Convert a input matrix into a matrix within visual range, so that one can output it into PNG file for inspection.
829
 * @param a The input matrix.
830
 * @param b The output matrix.
831
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
832
 */
833
void ccv_visualize(ccv_matrix_t* a, ccv_matrix_t** b, int type);
834
/**
835
 * If a given matrix has multiple channels, this function will compute a new matrix that each cell in the new matrix is the sum of all channels in the same cell of the given matrix.
836
 * @param a The input matrix.
837
 * @param b The output matrix.
838
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
839
 * @param flag ccv reserved this for now.
840
 */
841
void ccv_flatten(ccv_matrix_t* a, ccv_matrix_t** b, int type, int flag);
842
/**
843
 * Zero out a given matrix.
844
 * @param mat The given matrix.
845
 */
846
void ccv_zero(ccv_matrix_t* mat);
847
/**
848
 * Compute a new matrix that each element is first left shifted and then right shifted.
849
 * @param a The input matrix.
850
 * @param b The output matrix.
851
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
852
 * @param lr Left shift amount.
853
 * @param rr Right shift amount.
854
 */
855
void ccv_shift(ccv_matrix_t* a, ccv_matrix_t** b, int type, int lr, int rr);
856
/**
857
 * Check if any nan value in the given matrix, and return its position.
858
 * @param a The given matrix.
859
 */
860
int ccv_any_nan(ccv_matrix_t *a);
861
/**
862
 * Return a temporary ccv_dense_matrix_t matrix that is pointing to a given matrix data section but with different rows and cols. Useful to use part of the given matrix do computations without paying memory copy performance penalty.
863
 * @param a The given matrix.
864
 * @param y The y offset to the given matrix.
865
 * @param x The x offset to the given matrix.
866
 * @param rows The number of rows of the new matrix.
867
 * @param cols The number of cols of the new matrix.
868
 */
869
ccv_dense_matrix_t ccv_reshape(ccv_dense_matrix_t* a, int y, int x, int rows, int cols);
870
871
// 32-bit float to 16-bit float
872
void ccv_float_to_half_precision(float* f, uint16_t* h, size_t len);
873
void ccv_half_precision_to_float(uint16_t* h, float* f, size_t len);
874
875
// 64-bit float to 16-bit float
876
void ccv_double_to_half_precision(double* f, uint16_t* h, size_t len);
877
void ccv_half_precision_to_double(uint16_t* h, double* f, size_t len);
878
879
/* basic data structures ccv_util.c */
880
881
typedef struct {
882
  int width;
883
  int height;
884
} ccv_size_t;
885
886
inline static ccv_size_t ccv_size(int width, int height)
887
29
{
888
29
  ccv_size_t size;
889
29
  size.width = width;
890
29
  size.height = height;
891
29
  return size;
892
29
}
Unexecuted instantiation: util.tests.c:ccv_size
Unexecuted instantiation: basic.tests.c:ccv_size
Unexecuted instantiation: memory.tests.c:ccv_size
Unexecuted instantiation: transform.tests.c:ccv_size
Unexecuted instantiation: image_processing.tests.c:ccv_size
Unexecuted instantiation: 3rdparty.tests.c:ccv_size
Unexecuted instantiation: algebra.tests.c:ccv_size
Unexecuted instantiation: io.tests.c:ccv_size
Unexecuted instantiation: gradient.tests.c:ccv_size
Unexecuted instantiation: upsample.tests.c:ccv_size
Unexecuted instantiation: concat.tests.c:ccv_size
Unexecuted instantiation: tensor.bind.tests.c:ccv_size
Unexecuted instantiation: backward.tests.c:ccv_size
Unexecuted instantiation: graph.tests.c:ccv_size
Unexecuted instantiation: case_of.backward.tests.c:ccv_size
Unexecuted instantiation: while.backward.tests.c:ccv_size
Unexecuted instantiation: autograd.vector.tests.c:ccv_size
Unexecuted instantiation: dropout.tests.c:ccv_size
Unexecuted instantiation: custom.tests.c:ccv_size
Unexecuted instantiation: reduce.tests.c:ccv_size
Unexecuted instantiation: tfb.tests.c:ccv_size
Unexecuted instantiation: batch.norm.tests.c:ccv_size
Unexecuted instantiation: crossentropy.tests.c:ccv_size
Unexecuted instantiation: cnnp.core.tests.c:ccv_size
Unexecuted instantiation: symbolic.graph.tests.c:ccv_size
Unexecuted instantiation: case_of.tests.c:ccv_size
Unexecuted instantiation: micro.tests.c:ccv_size
Unexecuted instantiation: compression.tests.c:ccv_size
Unexecuted instantiation: dataframe.tests.c:ccv_size
Unexecuted instantiation: gemm.tests.c:ccv_size
Unexecuted instantiation: roi_align.tests.c:ccv_size
Unexecuted instantiation: swish.tests.c:ccv_size
Unexecuted instantiation: index.tests.c:ccv_size
Unexecuted instantiation: minimize.tests.c:ccv_size
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_size
Unexecuted instantiation: autograd.tests.c:ccv_size
Unexecuted instantiation: tensor.tests.c:ccv_size
Unexecuted instantiation: rand.tests.c:ccv_size
Unexecuted instantiation: while.tests.c:ccv_size
Unexecuted instantiation: nms.tests.c:ccv_size
Unexecuted instantiation: graph.io.tests.c:ccv_size
Unexecuted instantiation: cblas.tests.c:ccv_size
Unexecuted instantiation: simplify.tests.c:ccv_size
Unexecuted instantiation: numa.tests.c:ccv_size
Unexecuted instantiation: tape.tests.c:ccv_size
Unexecuted instantiation: dynamic.graph.tests.c:ccv_size
Unexecuted instantiation: layer.norm.tests.c:ccv_size
Unexecuted instantiation: parallel.tests.c:ccv_size
Unexecuted instantiation: winograd.tests.c:ccv_size
Unexecuted instantiation: dataframe.addons.tests.c:ccv_size
Unexecuted instantiation: broadcast.tests.c:ccv_size
Unexecuted instantiation: compare.tests.c:ccv_size
Unexecuted instantiation: smooth_l1.tests.c:ccv_size
Unexecuted instantiation: forward.tests.c:ccv_size
Unexecuted instantiation: output.tests.c:ccv_size
convnet.tests.c:ccv_size
Line
Count
Source
887
27
{
888
27
  ccv_size_t size;
889
27
  size.width = width;
890
27
  size.height = height;
891
27
  return size;
892
27
}
Unexecuted instantiation: numeric.tests.c:ccv_size
Unexecuted instantiation: defects.l0.1.tests.c:ccv_size
Unexecuted instantiation: cublas.tests.c:ccv_size
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_size
Unexecuted instantiation: imdb.tests.c:ccv_size
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_size
Unexecuted instantiation: random.tests.c:ccv_size
Unexecuted instantiation: cudnn.tests.c:ccv_size
Unexecuted instantiation: dense.net.tests.c:ccv_size
Unexecuted instantiation: cifar.tests.c:ccv_size
Unexecuted instantiation: rmsprop.tests.c:ccv_size
Unexecuted instantiation: sgd.tests.c:ccv_size
Unexecuted instantiation: nccl.tests.c:ccv_size
Unexecuted instantiation: schedule.tests.c:ccv_size
Unexecuted instantiation: loss.tests.c:ccv_size
Unexecuted instantiation: adam.tests.c:ccv_size
Unexecuted instantiation: ccv_cache.c:ccv_size
Unexecuted instantiation: ccv_memory.c:ccv_size
Unexecuted instantiation: ccv_io.c:ccv_size
Unexecuted instantiation: ccv_numeric.c:ccv_size
Unexecuted instantiation: ccv_algebra.c:ccv_size
Unexecuted instantiation: ccv_util.c:ccv_size
Unexecuted instantiation: ccv_basic.c:ccv_size
Unexecuted instantiation: ccv_image_processing.c:ccv_size
Unexecuted instantiation: ccv_resample.c:ccv_size
Unexecuted instantiation: ccv_transform.c:ccv_size
Unexecuted instantiation: ccv_classic.c:ccv_size
ccv_convnet.c:ccv_size
Line
Count
Source
887
2
{
888
2
  ccv_size_t size;
889
2
  size.width = width;
890
2
  size.height = height;
891
2
  return size;
892
2
}
Unexecuted instantiation: ccv_output.c:ccv_size
Unexecuted instantiation: cwc_convnet_ext.c:ccv_size
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_size
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_size
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_size
Unexecuted instantiation: ccv_nnc_stream.c:ccv_size
Unexecuted instantiation: ccv_nnc_micro.c:ccv_size
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_size
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_size
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_size
Unexecuted instantiation: ccv_nnc_graph.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_size
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_size
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_size
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_size
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_size
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_size
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_size
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_size
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_size
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_size
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_size
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_size
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_size
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_size
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_size
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_size
Unexecuted instantiation: ccv_cnnp_model.c:ccv_size
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_size
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_size
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_size
Unexecuted instantiation: co.c:ccv_size
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_size
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_size
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_size
Unexecuted instantiation: ccv_nnc_rand.c:ccv_size
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_size
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_size
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_size
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_size
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_size
Unexecuted instantiation: ccv_nnc_swish.c:ccv_size
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_size
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_size
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_size
Unexecuted instantiation: ccv_nnc_pool.c:ccv_size
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_size
Unexecuted instantiation: ccv_nnc_compression.c:ccv_size
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_size
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_size
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_size
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_size
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_size
Unexecuted instantiation: ccv_nnc_relu.c:ccv_size
Unexecuted instantiation: ccv_nnc_adam.c:ccv_size
Unexecuted instantiation: ccv_nnc_nms.c:ccv_size
Unexecuted instantiation: ccv_nnc_blas.c:ccv_size
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_size
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_size
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_size
Unexecuted instantiation: ccv_nnc_comm.c:ccv_size
Unexecuted instantiation: ccv_nnc_util.c:ccv_size
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_size
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_size
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_size
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_size
Unexecuted instantiation: ccv_nnc_ew.c:ccv_size
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_size
Unexecuted instantiation: ccv_nnc_norm.c:ccv_size
893
894
inline static int ccv_size_is_zero(ccv_size_t size)
895
0
{
896
0
  return size.width == 0 && size.height == 0;
897
0
}
Unexecuted instantiation: util.tests.c:ccv_size_is_zero
Unexecuted instantiation: basic.tests.c:ccv_size_is_zero
Unexecuted instantiation: memory.tests.c:ccv_size_is_zero
Unexecuted instantiation: transform.tests.c:ccv_size_is_zero
Unexecuted instantiation: image_processing.tests.c:ccv_size_is_zero
Unexecuted instantiation: 3rdparty.tests.c:ccv_size_is_zero
Unexecuted instantiation: algebra.tests.c:ccv_size_is_zero
Unexecuted instantiation: io.tests.c:ccv_size_is_zero
Unexecuted instantiation: gradient.tests.c:ccv_size_is_zero
Unexecuted instantiation: upsample.tests.c:ccv_size_is_zero
Unexecuted instantiation: concat.tests.c:ccv_size_is_zero
Unexecuted instantiation: tensor.bind.tests.c:ccv_size_is_zero
Unexecuted instantiation: backward.tests.c:ccv_size_is_zero
Unexecuted instantiation: graph.tests.c:ccv_size_is_zero
Unexecuted instantiation: case_of.backward.tests.c:ccv_size_is_zero
Unexecuted instantiation: while.backward.tests.c:ccv_size_is_zero
Unexecuted instantiation: autograd.vector.tests.c:ccv_size_is_zero
Unexecuted instantiation: dropout.tests.c:ccv_size_is_zero
Unexecuted instantiation: custom.tests.c:ccv_size_is_zero
Unexecuted instantiation: reduce.tests.c:ccv_size_is_zero
Unexecuted instantiation: tfb.tests.c:ccv_size_is_zero
Unexecuted instantiation: batch.norm.tests.c:ccv_size_is_zero
Unexecuted instantiation: crossentropy.tests.c:ccv_size_is_zero
Unexecuted instantiation: cnnp.core.tests.c:ccv_size_is_zero
Unexecuted instantiation: symbolic.graph.tests.c:ccv_size_is_zero
Unexecuted instantiation: case_of.tests.c:ccv_size_is_zero
Unexecuted instantiation: micro.tests.c:ccv_size_is_zero
Unexecuted instantiation: compression.tests.c:ccv_size_is_zero
Unexecuted instantiation: dataframe.tests.c:ccv_size_is_zero
Unexecuted instantiation: gemm.tests.c:ccv_size_is_zero
Unexecuted instantiation: roi_align.tests.c:ccv_size_is_zero
Unexecuted instantiation: swish.tests.c:ccv_size_is_zero
Unexecuted instantiation: index.tests.c:ccv_size_is_zero
Unexecuted instantiation: minimize.tests.c:ccv_size_is_zero
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_size_is_zero
Unexecuted instantiation: autograd.tests.c:ccv_size_is_zero
Unexecuted instantiation: tensor.tests.c:ccv_size_is_zero
Unexecuted instantiation: rand.tests.c:ccv_size_is_zero
Unexecuted instantiation: while.tests.c:ccv_size_is_zero
Unexecuted instantiation: nms.tests.c:ccv_size_is_zero
Unexecuted instantiation: graph.io.tests.c:ccv_size_is_zero
Unexecuted instantiation: cblas.tests.c:ccv_size_is_zero
Unexecuted instantiation: simplify.tests.c:ccv_size_is_zero
Unexecuted instantiation: numa.tests.c:ccv_size_is_zero
Unexecuted instantiation: tape.tests.c:ccv_size_is_zero
Unexecuted instantiation: dynamic.graph.tests.c:ccv_size_is_zero
Unexecuted instantiation: layer.norm.tests.c:ccv_size_is_zero
Unexecuted instantiation: parallel.tests.c:ccv_size_is_zero
Unexecuted instantiation: winograd.tests.c:ccv_size_is_zero
Unexecuted instantiation: dataframe.addons.tests.c:ccv_size_is_zero
Unexecuted instantiation: broadcast.tests.c:ccv_size_is_zero
Unexecuted instantiation: compare.tests.c:ccv_size_is_zero
Unexecuted instantiation: smooth_l1.tests.c:ccv_size_is_zero
Unexecuted instantiation: forward.tests.c:ccv_size_is_zero
Unexecuted instantiation: output.tests.c:ccv_size_is_zero
Unexecuted instantiation: convnet.tests.c:ccv_size_is_zero
Unexecuted instantiation: numeric.tests.c:ccv_size_is_zero
Unexecuted instantiation: defects.l0.1.tests.c:ccv_size_is_zero
Unexecuted instantiation: cublas.tests.c:ccv_size_is_zero
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_size_is_zero
Unexecuted instantiation: imdb.tests.c:ccv_size_is_zero
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_size_is_zero
Unexecuted instantiation: random.tests.c:ccv_size_is_zero
Unexecuted instantiation: cudnn.tests.c:ccv_size_is_zero
Unexecuted instantiation: dense.net.tests.c:ccv_size_is_zero
Unexecuted instantiation: cifar.tests.c:ccv_size_is_zero
Unexecuted instantiation: rmsprop.tests.c:ccv_size_is_zero
Unexecuted instantiation: sgd.tests.c:ccv_size_is_zero
Unexecuted instantiation: nccl.tests.c:ccv_size_is_zero
Unexecuted instantiation: schedule.tests.c:ccv_size_is_zero
Unexecuted instantiation: loss.tests.c:ccv_size_is_zero
Unexecuted instantiation: adam.tests.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cache.c:ccv_size_is_zero
Unexecuted instantiation: ccv_memory.c:ccv_size_is_zero
Unexecuted instantiation: ccv_io.c:ccv_size_is_zero
Unexecuted instantiation: ccv_numeric.c:ccv_size_is_zero
Unexecuted instantiation: ccv_algebra.c:ccv_size_is_zero
Unexecuted instantiation: ccv_util.c:ccv_size_is_zero
Unexecuted instantiation: ccv_basic.c:ccv_size_is_zero
Unexecuted instantiation: ccv_image_processing.c:ccv_size_is_zero
Unexecuted instantiation: ccv_resample.c:ccv_size_is_zero
Unexecuted instantiation: ccv_transform.c:ccv_size_is_zero
Unexecuted instantiation: ccv_classic.c:ccv_size_is_zero
Unexecuted instantiation: ccv_convnet.c:ccv_size_is_zero
Unexecuted instantiation: ccv_output.c:ccv_size_is_zero
Unexecuted instantiation: cwc_convnet_ext.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_stream.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_micro.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_graph.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_model.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_size_is_zero
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_size_is_zero
Unexecuted instantiation: co.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_rand.c:ccv_size_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_size_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_size_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_size_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_swish.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_pool.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_compression.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_relu.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_adam.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_nms.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_blas.c:ccv_size_is_zero
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_size_is_zero
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_comm.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_util.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_ew.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_size_is_zero
Unexecuted instantiation: ccv_nnc_norm.c:ccv_size_is_zero
898
899
typedef struct {
900
  int x;
901
  int y;
902
  int width;
903
  int height;
904
} ccv_rect_t;
905
906
inline static ccv_rect_t ccv_rect(int x, int y, int width, int height)
907
0
{
908
0
  ccv_rect_t rect;
909
0
  rect.x = x;
910
0
  rect.y = y;
911
0
  rect.width = width;
912
0
  rect.height = height;
913
0
  return rect;
914
0
}
Unexecuted instantiation: util.tests.c:ccv_rect
Unexecuted instantiation: basic.tests.c:ccv_rect
Unexecuted instantiation: memory.tests.c:ccv_rect
Unexecuted instantiation: transform.tests.c:ccv_rect
Unexecuted instantiation: image_processing.tests.c:ccv_rect
Unexecuted instantiation: 3rdparty.tests.c:ccv_rect
Unexecuted instantiation: algebra.tests.c:ccv_rect
Unexecuted instantiation: io.tests.c:ccv_rect
Unexecuted instantiation: gradient.tests.c:ccv_rect
Unexecuted instantiation: upsample.tests.c:ccv_rect
Unexecuted instantiation: concat.tests.c:ccv_rect
Unexecuted instantiation: tensor.bind.tests.c:ccv_rect
Unexecuted instantiation: backward.tests.c:ccv_rect
Unexecuted instantiation: graph.tests.c:ccv_rect
Unexecuted instantiation: case_of.backward.tests.c:ccv_rect
Unexecuted instantiation: while.backward.tests.c:ccv_rect
Unexecuted instantiation: autograd.vector.tests.c:ccv_rect
Unexecuted instantiation: dropout.tests.c:ccv_rect
Unexecuted instantiation: custom.tests.c:ccv_rect
Unexecuted instantiation: reduce.tests.c:ccv_rect
Unexecuted instantiation: tfb.tests.c:ccv_rect
Unexecuted instantiation: batch.norm.tests.c:ccv_rect
Unexecuted instantiation: crossentropy.tests.c:ccv_rect
Unexecuted instantiation: cnnp.core.tests.c:ccv_rect
Unexecuted instantiation: symbolic.graph.tests.c:ccv_rect
Unexecuted instantiation: case_of.tests.c:ccv_rect
Unexecuted instantiation: micro.tests.c:ccv_rect
Unexecuted instantiation: compression.tests.c:ccv_rect
Unexecuted instantiation: dataframe.tests.c:ccv_rect
Unexecuted instantiation: gemm.tests.c:ccv_rect
Unexecuted instantiation: roi_align.tests.c:ccv_rect
Unexecuted instantiation: swish.tests.c:ccv_rect
Unexecuted instantiation: index.tests.c:ccv_rect
Unexecuted instantiation: minimize.tests.c:ccv_rect
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_rect
Unexecuted instantiation: autograd.tests.c:ccv_rect
Unexecuted instantiation: tensor.tests.c:ccv_rect
Unexecuted instantiation: rand.tests.c:ccv_rect
Unexecuted instantiation: while.tests.c:ccv_rect
Unexecuted instantiation: nms.tests.c:ccv_rect
Unexecuted instantiation: graph.io.tests.c:ccv_rect
Unexecuted instantiation: cblas.tests.c:ccv_rect
Unexecuted instantiation: simplify.tests.c:ccv_rect
Unexecuted instantiation: numa.tests.c:ccv_rect
Unexecuted instantiation: tape.tests.c:ccv_rect
Unexecuted instantiation: dynamic.graph.tests.c:ccv_rect
Unexecuted instantiation: layer.norm.tests.c:ccv_rect
Unexecuted instantiation: parallel.tests.c:ccv_rect
Unexecuted instantiation: winograd.tests.c:ccv_rect
Unexecuted instantiation: dataframe.addons.tests.c:ccv_rect
Unexecuted instantiation: broadcast.tests.c:ccv_rect
Unexecuted instantiation: compare.tests.c:ccv_rect
Unexecuted instantiation: smooth_l1.tests.c:ccv_rect
Unexecuted instantiation: forward.tests.c:ccv_rect
Unexecuted instantiation: output.tests.c:ccv_rect
Unexecuted instantiation: convnet.tests.c:ccv_rect
Unexecuted instantiation: numeric.tests.c:ccv_rect
Unexecuted instantiation: defects.l0.1.tests.c:ccv_rect
Unexecuted instantiation: cublas.tests.c:ccv_rect
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_rect
Unexecuted instantiation: imdb.tests.c:ccv_rect
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_rect
Unexecuted instantiation: random.tests.c:ccv_rect
Unexecuted instantiation: cudnn.tests.c:ccv_rect
Unexecuted instantiation: dense.net.tests.c:ccv_rect
Unexecuted instantiation: cifar.tests.c:ccv_rect
Unexecuted instantiation: rmsprop.tests.c:ccv_rect
Unexecuted instantiation: sgd.tests.c:ccv_rect
Unexecuted instantiation: nccl.tests.c:ccv_rect
Unexecuted instantiation: schedule.tests.c:ccv_rect
Unexecuted instantiation: loss.tests.c:ccv_rect
Unexecuted instantiation: adam.tests.c:ccv_rect
Unexecuted instantiation: ccv_cache.c:ccv_rect
Unexecuted instantiation: ccv_memory.c:ccv_rect
Unexecuted instantiation: ccv_io.c:ccv_rect
Unexecuted instantiation: ccv_numeric.c:ccv_rect
Unexecuted instantiation: ccv_algebra.c:ccv_rect
Unexecuted instantiation: ccv_util.c:ccv_rect
Unexecuted instantiation: ccv_basic.c:ccv_rect
Unexecuted instantiation: ccv_image_processing.c:ccv_rect
Unexecuted instantiation: ccv_resample.c:ccv_rect
Unexecuted instantiation: ccv_transform.c:ccv_rect
Unexecuted instantiation: ccv_classic.c:ccv_rect
Unexecuted instantiation: ccv_convnet.c:ccv_rect
Unexecuted instantiation: ccv_output.c:ccv_rect
Unexecuted instantiation: cwc_convnet_ext.c:ccv_rect
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_rect
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_rect
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_rect
Unexecuted instantiation: ccv_nnc_stream.c:ccv_rect
Unexecuted instantiation: ccv_nnc_micro.c:ccv_rect
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_rect
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_rect
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_rect
Unexecuted instantiation: ccv_nnc_graph.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_rect
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_rect
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_rect
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_rect
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_model.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_rect
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_rect
Unexecuted instantiation: co.c:ccv_rect
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_rect
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_rect
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_rect
Unexecuted instantiation: ccv_nnc_rand.c:ccv_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_rect
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_rect
Unexecuted instantiation: ccv_nnc_swish.c:ccv_rect
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_rect
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_rect
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_rect
Unexecuted instantiation: ccv_nnc_pool.c:ccv_rect
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_rect
Unexecuted instantiation: ccv_nnc_compression.c:ccv_rect
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_rect
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_rect
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_rect
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_rect
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_rect
Unexecuted instantiation: ccv_nnc_relu.c:ccv_rect
Unexecuted instantiation: ccv_nnc_adam.c:ccv_rect
Unexecuted instantiation: ccv_nnc_nms.c:ccv_rect
Unexecuted instantiation: ccv_nnc_blas.c:ccv_rect
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_rect
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_rect
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_rect
Unexecuted instantiation: ccv_nnc_comm.c:ccv_rect
Unexecuted instantiation: ccv_nnc_util.c:ccv_rect
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_rect
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_rect
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_rect
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_rect
Unexecuted instantiation: ccv_nnc_ew.c:ccv_rect
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_rect
Unexecuted instantiation: ccv_nnc_norm.c:ccv_rect
915
916
inline static int ccv_rect_is_zero(ccv_rect_t rect)
917
0
{
918
0
  return rect.x == 0 && rect.y == 0 && rect.width == 0 && rect.height == 0;
919
0
}
Unexecuted instantiation: util.tests.c:ccv_rect_is_zero
Unexecuted instantiation: basic.tests.c:ccv_rect_is_zero
Unexecuted instantiation: memory.tests.c:ccv_rect_is_zero
Unexecuted instantiation: transform.tests.c:ccv_rect_is_zero
Unexecuted instantiation: image_processing.tests.c:ccv_rect_is_zero
Unexecuted instantiation: 3rdparty.tests.c:ccv_rect_is_zero
Unexecuted instantiation: algebra.tests.c:ccv_rect_is_zero
Unexecuted instantiation: io.tests.c:ccv_rect_is_zero
Unexecuted instantiation: gradient.tests.c:ccv_rect_is_zero
Unexecuted instantiation: upsample.tests.c:ccv_rect_is_zero
Unexecuted instantiation: concat.tests.c:ccv_rect_is_zero
Unexecuted instantiation: tensor.bind.tests.c:ccv_rect_is_zero
Unexecuted instantiation: backward.tests.c:ccv_rect_is_zero
Unexecuted instantiation: graph.tests.c:ccv_rect_is_zero
Unexecuted instantiation: case_of.backward.tests.c:ccv_rect_is_zero
Unexecuted instantiation: while.backward.tests.c:ccv_rect_is_zero
Unexecuted instantiation: autograd.vector.tests.c:ccv_rect_is_zero
Unexecuted instantiation: dropout.tests.c:ccv_rect_is_zero
Unexecuted instantiation: custom.tests.c:ccv_rect_is_zero
Unexecuted instantiation: reduce.tests.c:ccv_rect_is_zero
Unexecuted instantiation: tfb.tests.c:ccv_rect_is_zero
Unexecuted instantiation: batch.norm.tests.c:ccv_rect_is_zero
Unexecuted instantiation: crossentropy.tests.c:ccv_rect_is_zero
Unexecuted instantiation: cnnp.core.tests.c:ccv_rect_is_zero
Unexecuted instantiation: symbolic.graph.tests.c:ccv_rect_is_zero
Unexecuted instantiation: case_of.tests.c:ccv_rect_is_zero
Unexecuted instantiation: micro.tests.c:ccv_rect_is_zero
Unexecuted instantiation: compression.tests.c:ccv_rect_is_zero
Unexecuted instantiation: dataframe.tests.c:ccv_rect_is_zero
Unexecuted instantiation: gemm.tests.c:ccv_rect_is_zero
Unexecuted instantiation: roi_align.tests.c:ccv_rect_is_zero
Unexecuted instantiation: swish.tests.c:ccv_rect_is_zero
Unexecuted instantiation: index.tests.c:ccv_rect_is_zero
Unexecuted instantiation: minimize.tests.c:ccv_rect_is_zero
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_rect_is_zero
Unexecuted instantiation: autograd.tests.c:ccv_rect_is_zero
Unexecuted instantiation: tensor.tests.c:ccv_rect_is_zero
Unexecuted instantiation: rand.tests.c:ccv_rect_is_zero
Unexecuted instantiation: while.tests.c:ccv_rect_is_zero
Unexecuted instantiation: nms.tests.c:ccv_rect_is_zero
Unexecuted instantiation: graph.io.tests.c:ccv_rect_is_zero
Unexecuted instantiation: cblas.tests.c:ccv_rect_is_zero
Unexecuted instantiation: simplify.tests.c:ccv_rect_is_zero
Unexecuted instantiation: numa.tests.c:ccv_rect_is_zero
Unexecuted instantiation: tape.tests.c:ccv_rect_is_zero
Unexecuted instantiation: dynamic.graph.tests.c:ccv_rect_is_zero
Unexecuted instantiation: layer.norm.tests.c:ccv_rect_is_zero
Unexecuted instantiation: parallel.tests.c:ccv_rect_is_zero
Unexecuted instantiation: winograd.tests.c:ccv_rect_is_zero
Unexecuted instantiation: dataframe.addons.tests.c:ccv_rect_is_zero
Unexecuted instantiation: broadcast.tests.c:ccv_rect_is_zero
Unexecuted instantiation: compare.tests.c:ccv_rect_is_zero
Unexecuted instantiation: smooth_l1.tests.c:ccv_rect_is_zero
Unexecuted instantiation: forward.tests.c:ccv_rect_is_zero
Unexecuted instantiation: output.tests.c:ccv_rect_is_zero
Unexecuted instantiation: convnet.tests.c:ccv_rect_is_zero
Unexecuted instantiation: numeric.tests.c:ccv_rect_is_zero
Unexecuted instantiation: defects.l0.1.tests.c:ccv_rect_is_zero
Unexecuted instantiation: cublas.tests.c:ccv_rect_is_zero
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_rect_is_zero
Unexecuted instantiation: imdb.tests.c:ccv_rect_is_zero
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_rect_is_zero
Unexecuted instantiation: random.tests.c:ccv_rect_is_zero
Unexecuted instantiation: cudnn.tests.c:ccv_rect_is_zero
Unexecuted instantiation: dense.net.tests.c:ccv_rect_is_zero
Unexecuted instantiation: cifar.tests.c:ccv_rect_is_zero
Unexecuted instantiation: rmsprop.tests.c:ccv_rect_is_zero
Unexecuted instantiation: sgd.tests.c:ccv_rect_is_zero
Unexecuted instantiation: nccl.tests.c:ccv_rect_is_zero
Unexecuted instantiation: schedule.tests.c:ccv_rect_is_zero
Unexecuted instantiation: loss.tests.c:ccv_rect_is_zero
Unexecuted instantiation: adam.tests.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cache.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_memory.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_io.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_numeric.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_algebra.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_util.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_basic.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_image_processing.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_resample.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_transform.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_classic.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_convnet.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_output.c:ccv_rect_is_zero
Unexecuted instantiation: cwc_convnet_ext.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_stream.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_micro.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_graph.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_model.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_rect_is_zero
Unexecuted instantiation: co.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_rand.c:ccv_rect_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_rect_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_rect_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_rect_is_zero
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_swish.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_pool.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_compression.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_relu.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_adam.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_nms.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_blas.c:ccv_rect_is_zero
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_rect_is_zero
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_comm.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_util.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_ew.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_rect_is_zero
Unexecuted instantiation: ccv_nnc_norm.c:ccv_rect_is_zero
920
921
typedef struct {
922
  float x;
923
  float y;
924
  float width;
925
  float height;
926
} ccv_decimal_rect_t;
927
928
inline static ccv_decimal_rect_t ccv_decimal_rect(float x, float y, float width, float height)
929
0
{
930
0
  ccv_decimal_rect_t rect;
931
0
  rect.x = x;
932
0
  rect.y = y;
933
0
  rect.width = width;
934
0
  rect.height = height;
935
0
  return rect;
936
0
}
Unexecuted instantiation: util.tests.c:ccv_decimal_rect
Unexecuted instantiation: basic.tests.c:ccv_decimal_rect
Unexecuted instantiation: memory.tests.c:ccv_decimal_rect
Unexecuted instantiation: transform.tests.c:ccv_decimal_rect
Unexecuted instantiation: image_processing.tests.c:ccv_decimal_rect
Unexecuted instantiation: 3rdparty.tests.c:ccv_decimal_rect
Unexecuted instantiation: algebra.tests.c:ccv_decimal_rect
Unexecuted instantiation: io.tests.c:ccv_decimal_rect
Unexecuted instantiation: gradient.tests.c:ccv_decimal_rect
Unexecuted instantiation: upsample.tests.c:ccv_decimal_rect
Unexecuted instantiation: concat.tests.c:ccv_decimal_rect
Unexecuted instantiation: tensor.bind.tests.c:ccv_decimal_rect
Unexecuted instantiation: backward.tests.c:ccv_decimal_rect
Unexecuted instantiation: graph.tests.c:ccv_decimal_rect
Unexecuted instantiation: case_of.backward.tests.c:ccv_decimal_rect
Unexecuted instantiation: while.backward.tests.c:ccv_decimal_rect
Unexecuted instantiation: autograd.vector.tests.c:ccv_decimal_rect
Unexecuted instantiation: dropout.tests.c:ccv_decimal_rect
Unexecuted instantiation: custom.tests.c:ccv_decimal_rect
Unexecuted instantiation: reduce.tests.c:ccv_decimal_rect
Unexecuted instantiation: tfb.tests.c:ccv_decimal_rect
Unexecuted instantiation: batch.norm.tests.c:ccv_decimal_rect
Unexecuted instantiation: crossentropy.tests.c:ccv_decimal_rect
Unexecuted instantiation: cnnp.core.tests.c:ccv_decimal_rect
Unexecuted instantiation: symbolic.graph.tests.c:ccv_decimal_rect
Unexecuted instantiation: case_of.tests.c:ccv_decimal_rect
Unexecuted instantiation: micro.tests.c:ccv_decimal_rect
Unexecuted instantiation: compression.tests.c:ccv_decimal_rect
Unexecuted instantiation: dataframe.tests.c:ccv_decimal_rect
Unexecuted instantiation: gemm.tests.c:ccv_decimal_rect
Unexecuted instantiation: roi_align.tests.c:ccv_decimal_rect
Unexecuted instantiation: swish.tests.c:ccv_decimal_rect
Unexecuted instantiation: index.tests.c:ccv_decimal_rect
Unexecuted instantiation: minimize.tests.c:ccv_decimal_rect
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_decimal_rect
Unexecuted instantiation: autograd.tests.c:ccv_decimal_rect
Unexecuted instantiation: tensor.tests.c:ccv_decimal_rect
Unexecuted instantiation: rand.tests.c:ccv_decimal_rect
Unexecuted instantiation: while.tests.c:ccv_decimal_rect
Unexecuted instantiation: nms.tests.c:ccv_decimal_rect
Unexecuted instantiation: graph.io.tests.c:ccv_decimal_rect
Unexecuted instantiation: cblas.tests.c:ccv_decimal_rect
Unexecuted instantiation: simplify.tests.c:ccv_decimal_rect
Unexecuted instantiation: numa.tests.c:ccv_decimal_rect
Unexecuted instantiation: tape.tests.c:ccv_decimal_rect
Unexecuted instantiation: dynamic.graph.tests.c:ccv_decimal_rect
Unexecuted instantiation: layer.norm.tests.c:ccv_decimal_rect
Unexecuted instantiation: parallel.tests.c:ccv_decimal_rect
Unexecuted instantiation: winograd.tests.c:ccv_decimal_rect
Unexecuted instantiation: dataframe.addons.tests.c:ccv_decimal_rect
Unexecuted instantiation: broadcast.tests.c:ccv_decimal_rect
Unexecuted instantiation: compare.tests.c:ccv_decimal_rect
Unexecuted instantiation: smooth_l1.tests.c:ccv_decimal_rect
Unexecuted instantiation: forward.tests.c:ccv_decimal_rect
Unexecuted instantiation: output.tests.c:ccv_decimal_rect
Unexecuted instantiation: convnet.tests.c:ccv_decimal_rect
Unexecuted instantiation: numeric.tests.c:ccv_decimal_rect
Unexecuted instantiation: defects.l0.1.tests.c:ccv_decimal_rect
Unexecuted instantiation: cublas.tests.c:ccv_decimal_rect
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_decimal_rect
Unexecuted instantiation: imdb.tests.c:ccv_decimal_rect
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_decimal_rect
Unexecuted instantiation: random.tests.c:ccv_decimal_rect
Unexecuted instantiation: cudnn.tests.c:ccv_decimal_rect
Unexecuted instantiation: dense.net.tests.c:ccv_decimal_rect
Unexecuted instantiation: cifar.tests.c:ccv_decimal_rect
Unexecuted instantiation: rmsprop.tests.c:ccv_decimal_rect
Unexecuted instantiation: sgd.tests.c:ccv_decimal_rect
Unexecuted instantiation: nccl.tests.c:ccv_decimal_rect
Unexecuted instantiation: schedule.tests.c:ccv_decimal_rect
Unexecuted instantiation: loss.tests.c:ccv_decimal_rect
Unexecuted instantiation: adam.tests.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cache.c:ccv_decimal_rect
Unexecuted instantiation: ccv_memory.c:ccv_decimal_rect
Unexecuted instantiation: ccv_io.c:ccv_decimal_rect
Unexecuted instantiation: ccv_numeric.c:ccv_decimal_rect
Unexecuted instantiation: ccv_algebra.c:ccv_decimal_rect
Unexecuted instantiation: ccv_util.c:ccv_decimal_rect
Unexecuted instantiation: ccv_basic.c:ccv_decimal_rect
Unexecuted instantiation: ccv_image_processing.c:ccv_decimal_rect
Unexecuted instantiation: ccv_resample.c:ccv_decimal_rect
Unexecuted instantiation: ccv_transform.c:ccv_decimal_rect
Unexecuted instantiation: ccv_classic.c:ccv_decimal_rect
Unexecuted instantiation: ccv_convnet.c:ccv_decimal_rect
Unexecuted instantiation: ccv_output.c:ccv_decimal_rect
Unexecuted instantiation: cwc_convnet_ext.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_stream.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_micro.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_graph.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_model.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_decimal_rect
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_decimal_rect
Unexecuted instantiation: co.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_rand.c:ccv_decimal_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_decimal_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_decimal_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_decimal_rect
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_swish.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_pool.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_compression.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_relu.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_adam.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_nms.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_blas.c:ccv_decimal_rect
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_decimal_rect
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_comm.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_util.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_ew.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_decimal_rect
Unexecuted instantiation: ccv_nnc_norm.c:ccv_decimal_rect
937
938
typedef struct {
939
  int type;
940
  uint64_t sig;
941
  int refcount;
942
  int rnum;
943
  int size;
944
  int rsize;
945
  void* data;
946
} ccv_array_t;
947
948
/**
949
 * Create a new, self-growing array.
950
 * @param rnum The initial capacity of the array.
951
 * @param rsize The size of each element in the array.
952
 * @param sig The signature for this array.
953
 */
954
CCV_WARN_UNUSED(ccv_array_t*) ccv_array_new(int rsize, int rnum, uint64_t sig);
955
/**
956
 * Push a new element into the array.
957
 * @param array The array.
958
 * @param r The pointer to new element, it will then be copied into the array.
959
 */
960
void ccv_array_push(ccv_array_t* array, const void* r);
961
typedef int(*ccv_array_group_f)(const void*, const void*, void*);
962
/**
963
 * Group elements in the array from its similarity.
964
 * @param array The array.
965
 * @param index The output index, same group element will have the same index.
966
 * @param gfunc int ccv_array_group_f(const void* a, const void* b, void* data). Return 1 if a and b are in the same group.
967
 * @param data Any extra user data.
968
 */
969
int ccv_array_group(ccv_array_t* array, ccv_array_t** index, ccv_array_group_f gfunc, void* data);
970
void ccv_make_array_immutable(ccv_array_t* array);
971
void ccv_make_array_mutable(ccv_array_t* array);
972
/**
973
 * Zero out the array, it won't change the array->rnum however.
974
 * @param array The array.
975
 */
976
void ccv_array_zero(ccv_array_t* array);
977
/**
978
 * Resize the array, it will change the array->rnum and zero init the rest.
979
 * @param array The array.
980
 * @param rnum The expanded size of the array.
981
 */
982
void ccv_array_resize(ccv_array_t* array, int rnum);
983
/**
984
 * Clear the array, it will reset the array->rnum to 0.
985
 * @param array The array.
986
 */
987
void ccv_array_clear(ccv_array_t* array);
988
/**
989
 * Free up the array immediately.
990
 * @param array The array.
991
 */
992
void ccv_array_free_immediately(ccv_array_t* array);
993
/**
994
 * Free up the array. If array's signature is non-zero, we may put it into cache so that later on, we can shortcut and return this array directly.
995
 * @param array The array.
996
 */
997
void ccv_array_free(ccv_array_t* array);
998
/**
999
 * Get a specific element from an array
1000
 * @param a The array.
1001
 * @param i The index of the element in the array.
1002
 */
1003
24.7M
#define ccv_array_get(a, i) ((void*)(((char*)((a)->data)) + (size_t)(a)->rsize * (size_t)(
i34.2k
)))
1004
1005
typedef struct {
1006
  int x, y;
1007
} ccv_point_t;
1008
1009
inline static ccv_point_t ccv_point(int x, int y)
1010
0
{
1011
0
  ccv_point_t point;
1012
0
  point.x = x;
1013
0
  point.y = y;
1014
0
  return point;
1015
0
}
Unexecuted instantiation: util.tests.c:ccv_point
Unexecuted instantiation: basic.tests.c:ccv_point
Unexecuted instantiation: memory.tests.c:ccv_point
Unexecuted instantiation: transform.tests.c:ccv_point
Unexecuted instantiation: image_processing.tests.c:ccv_point
Unexecuted instantiation: 3rdparty.tests.c:ccv_point
Unexecuted instantiation: algebra.tests.c:ccv_point
Unexecuted instantiation: io.tests.c:ccv_point
Unexecuted instantiation: gradient.tests.c:ccv_point
Unexecuted instantiation: upsample.tests.c:ccv_point
Unexecuted instantiation: concat.tests.c:ccv_point
Unexecuted instantiation: tensor.bind.tests.c:ccv_point
Unexecuted instantiation: backward.tests.c:ccv_point
Unexecuted instantiation: graph.tests.c:ccv_point
Unexecuted instantiation: case_of.backward.tests.c:ccv_point
Unexecuted instantiation: while.backward.tests.c:ccv_point
Unexecuted instantiation: autograd.vector.tests.c:ccv_point
Unexecuted instantiation: dropout.tests.c:ccv_point
Unexecuted instantiation: custom.tests.c:ccv_point
Unexecuted instantiation: reduce.tests.c:ccv_point
Unexecuted instantiation: tfb.tests.c:ccv_point
Unexecuted instantiation: batch.norm.tests.c:ccv_point
Unexecuted instantiation: crossentropy.tests.c:ccv_point
Unexecuted instantiation: cnnp.core.tests.c:ccv_point
Unexecuted instantiation: symbolic.graph.tests.c:ccv_point
Unexecuted instantiation: case_of.tests.c:ccv_point
Unexecuted instantiation: micro.tests.c:ccv_point
Unexecuted instantiation: compression.tests.c:ccv_point
Unexecuted instantiation: dataframe.tests.c:ccv_point
Unexecuted instantiation: gemm.tests.c:ccv_point
Unexecuted instantiation: roi_align.tests.c:ccv_point
Unexecuted instantiation: swish.tests.c:ccv_point
Unexecuted instantiation: index.tests.c:ccv_point
Unexecuted instantiation: minimize.tests.c:ccv_point
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_point
Unexecuted instantiation: autograd.tests.c:ccv_point
Unexecuted instantiation: tensor.tests.c:ccv_point
Unexecuted instantiation: rand.tests.c:ccv_point
Unexecuted instantiation: while.tests.c:ccv_point
Unexecuted instantiation: nms.tests.c:ccv_point
Unexecuted instantiation: graph.io.tests.c:ccv_point
Unexecuted instantiation: cblas.tests.c:ccv_point
Unexecuted instantiation: simplify.tests.c:ccv_point
Unexecuted instantiation: numa.tests.c:ccv_point
Unexecuted instantiation: tape.tests.c:ccv_point
Unexecuted instantiation: dynamic.graph.tests.c:ccv_point
Unexecuted instantiation: layer.norm.tests.c:ccv_point
Unexecuted instantiation: parallel.tests.c:ccv_point
Unexecuted instantiation: winograd.tests.c:ccv_point
Unexecuted instantiation: dataframe.addons.tests.c:ccv_point
Unexecuted instantiation: broadcast.tests.c:ccv_point
Unexecuted instantiation: compare.tests.c:ccv_point
Unexecuted instantiation: smooth_l1.tests.c:ccv_point
Unexecuted instantiation: forward.tests.c:ccv_point
Unexecuted instantiation: output.tests.c:ccv_point
Unexecuted instantiation: convnet.tests.c:ccv_point
Unexecuted instantiation: numeric.tests.c:ccv_point
Unexecuted instantiation: defects.l0.1.tests.c:ccv_point
Unexecuted instantiation: cublas.tests.c:ccv_point
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_point
Unexecuted instantiation: imdb.tests.c:ccv_point
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_point
Unexecuted instantiation: random.tests.c:ccv_point
Unexecuted instantiation: cudnn.tests.c:ccv_point
Unexecuted instantiation: dense.net.tests.c:ccv_point
Unexecuted instantiation: cifar.tests.c:ccv_point
Unexecuted instantiation: rmsprop.tests.c:ccv_point
Unexecuted instantiation: sgd.tests.c:ccv_point
Unexecuted instantiation: nccl.tests.c:ccv_point
Unexecuted instantiation: schedule.tests.c:ccv_point
Unexecuted instantiation: loss.tests.c:ccv_point
Unexecuted instantiation: adam.tests.c:ccv_point
Unexecuted instantiation: ccv_cache.c:ccv_point
Unexecuted instantiation: ccv_memory.c:ccv_point
Unexecuted instantiation: ccv_io.c:ccv_point
Unexecuted instantiation: ccv_numeric.c:ccv_point
Unexecuted instantiation: ccv_algebra.c:ccv_point
Unexecuted instantiation: ccv_util.c:ccv_point
Unexecuted instantiation: ccv_basic.c:ccv_point
Unexecuted instantiation: ccv_image_processing.c:ccv_point
Unexecuted instantiation: ccv_resample.c:ccv_point
Unexecuted instantiation: ccv_transform.c:ccv_point
Unexecuted instantiation: ccv_classic.c:ccv_point
Unexecuted instantiation: ccv_convnet.c:ccv_point
Unexecuted instantiation: ccv_output.c:ccv_point
Unexecuted instantiation: cwc_convnet_ext.c:ccv_point
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_point
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_point
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_point
Unexecuted instantiation: ccv_nnc_stream.c:ccv_point
Unexecuted instantiation: ccv_nnc_micro.c:ccv_point
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_point
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_point
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_point
Unexecuted instantiation: ccv_nnc_graph.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_point
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_point
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_point
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_point
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_point
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_point
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_point
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_point
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_point
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_point
Unexecuted instantiation: ccv_cnnp_model.c:ccv_point
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_point
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_point
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_point
Unexecuted instantiation: co.c:ccv_point
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_point
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_point
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_point
Unexecuted instantiation: ccv_nnc_rand.c:ccv_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_point
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_point
Unexecuted instantiation: ccv_nnc_swish.c:ccv_point
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_point
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_point
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_point
Unexecuted instantiation: ccv_nnc_pool.c:ccv_point
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_point
Unexecuted instantiation: ccv_nnc_compression.c:ccv_point
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_point
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_point
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_point
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_point
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_point
Unexecuted instantiation: ccv_nnc_relu.c:ccv_point
Unexecuted instantiation: ccv_nnc_adam.c:ccv_point
Unexecuted instantiation: ccv_nnc_nms.c:ccv_point
Unexecuted instantiation: ccv_nnc_blas.c:ccv_point
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_point
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_point
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_point
Unexecuted instantiation: ccv_nnc_comm.c:ccv_point
Unexecuted instantiation: ccv_nnc_util.c:ccv_point
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_point
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_point
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_point
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_point
Unexecuted instantiation: ccv_nnc_ew.c:ccv_point
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_point
Unexecuted instantiation: ccv_nnc_norm.c:ccv_point
1016
1017
typedef struct {
1018
  float x, y;
1019
} ccv_decimal_point_t;
1020
1021
inline static ccv_decimal_point_t ccv_decimal_point(float x, float y)
1022
0
{
1023
0
  ccv_decimal_point_t point;
1024
0
  point.x = x;
1025
0
  point.y = y;
1026
0
  return point;
1027
0
}
Unexecuted instantiation: util.tests.c:ccv_decimal_point
Unexecuted instantiation: basic.tests.c:ccv_decimal_point
Unexecuted instantiation: memory.tests.c:ccv_decimal_point
Unexecuted instantiation: transform.tests.c:ccv_decimal_point
Unexecuted instantiation: image_processing.tests.c:ccv_decimal_point
Unexecuted instantiation: 3rdparty.tests.c:ccv_decimal_point
Unexecuted instantiation: algebra.tests.c:ccv_decimal_point
Unexecuted instantiation: io.tests.c:ccv_decimal_point
Unexecuted instantiation: gradient.tests.c:ccv_decimal_point
Unexecuted instantiation: upsample.tests.c:ccv_decimal_point
Unexecuted instantiation: concat.tests.c:ccv_decimal_point
Unexecuted instantiation: tensor.bind.tests.c:ccv_decimal_point
Unexecuted instantiation: backward.tests.c:ccv_decimal_point
Unexecuted instantiation: graph.tests.c:ccv_decimal_point
Unexecuted instantiation: case_of.backward.tests.c:ccv_decimal_point
Unexecuted instantiation: while.backward.tests.c:ccv_decimal_point
Unexecuted instantiation: autograd.vector.tests.c:ccv_decimal_point
Unexecuted instantiation: dropout.tests.c:ccv_decimal_point
Unexecuted instantiation: custom.tests.c:ccv_decimal_point
Unexecuted instantiation: reduce.tests.c:ccv_decimal_point
Unexecuted instantiation: tfb.tests.c:ccv_decimal_point
Unexecuted instantiation: batch.norm.tests.c:ccv_decimal_point
Unexecuted instantiation: crossentropy.tests.c:ccv_decimal_point
Unexecuted instantiation: cnnp.core.tests.c:ccv_decimal_point
Unexecuted instantiation: symbolic.graph.tests.c:ccv_decimal_point
Unexecuted instantiation: case_of.tests.c:ccv_decimal_point
Unexecuted instantiation: micro.tests.c:ccv_decimal_point
Unexecuted instantiation: compression.tests.c:ccv_decimal_point
Unexecuted instantiation: dataframe.tests.c:ccv_decimal_point
Unexecuted instantiation: gemm.tests.c:ccv_decimal_point
Unexecuted instantiation: roi_align.tests.c:ccv_decimal_point
Unexecuted instantiation: swish.tests.c:ccv_decimal_point
Unexecuted instantiation: index.tests.c:ccv_decimal_point
Unexecuted instantiation: minimize.tests.c:ccv_decimal_point
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_decimal_point
Unexecuted instantiation: autograd.tests.c:ccv_decimal_point
Unexecuted instantiation: tensor.tests.c:ccv_decimal_point
Unexecuted instantiation: rand.tests.c:ccv_decimal_point
Unexecuted instantiation: while.tests.c:ccv_decimal_point
Unexecuted instantiation: nms.tests.c:ccv_decimal_point
Unexecuted instantiation: graph.io.tests.c:ccv_decimal_point
Unexecuted instantiation: cblas.tests.c:ccv_decimal_point
Unexecuted instantiation: simplify.tests.c:ccv_decimal_point
Unexecuted instantiation: numa.tests.c:ccv_decimal_point
Unexecuted instantiation: tape.tests.c:ccv_decimal_point
Unexecuted instantiation: dynamic.graph.tests.c:ccv_decimal_point
Unexecuted instantiation: layer.norm.tests.c:ccv_decimal_point
Unexecuted instantiation: parallel.tests.c:ccv_decimal_point
Unexecuted instantiation: winograd.tests.c:ccv_decimal_point
Unexecuted instantiation: dataframe.addons.tests.c:ccv_decimal_point
Unexecuted instantiation: broadcast.tests.c:ccv_decimal_point
Unexecuted instantiation: compare.tests.c:ccv_decimal_point
Unexecuted instantiation: smooth_l1.tests.c:ccv_decimal_point
Unexecuted instantiation: forward.tests.c:ccv_decimal_point
Unexecuted instantiation: output.tests.c:ccv_decimal_point
Unexecuted instantiation: convnet.tests.c:ccv_decimal_point
Unexecuted instantiation: numeric.tests.c:ccv_decimal_point
Unexecuted instantiation: defects.l0.1.tests.c:ccv_decimal_point
Unexecuted instantiation: cublas.tests.c:ccv_decimal_point
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_decimal_point
Unexecuted instantiation: imdb.tests.c:ccv_decimal_point
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_decimal_point
Unexecuted instantiation: random.tests.c:ccv_decimal_point
Unexecuted instantiation: cudnn.tests.c:ccv_decimal_point
Unexecuted instantiation: dense.net.tests.c:ccv_decimal_point
Unexecuted instantiation: cifar.tests.c:ccv_decimal_point
Unexecuted instantiation: rmsprop.tests.c:ccv_decimal_point
Unexecuted instantiation: sgd.tests.c:ccv_decimal_point
Unexecuted instantiation: nccl.tests.c:ccv_decimal_point
Unexecuted instantiation: schedule.tests.c:ccv_decimal_point
Unexecuted instantiation: loss.tests.c:ccv_decimal_point
Unexecuted instantiation: adam.tests.c:ccv_decimal_point
Unexecuted instantiation: ccv_cache.c:ccv_decimal_point
Unexecuted instantiation: ccv_memory.c:ccv_decimal_point
Unexecuted instantiation: ccv_io.c:ccv_decimal_point
Unexecuted instantiation: ccv_numeric.c:ccv_decimal_point
Unexecuted instantiation: ccv_algebra.c:ccv_decimal_point
Unexecuted instantiation: ccv_util.c:ccv_decimal_point
Unexecuted instantiation: ccv_basic.c:ccv_decimal_point
Unexecuted instantiation: ccv_image_processing.c:ccv_decimal_point
Unexecuted instantiation: ccv_resample.c:ccv_decimal_point
Unexecuted instantiation: ccv_transform.c:ccv_decimal_point
Unexecuted instantiation: ccv_classic.c:ccv_decimal_point
Unexecuted instantiation: ccv_convnet.c:ccv_decimal_point
Unexecuted instantiation: ccv_output.c:ccv_decimal_point
Unexecuted instantiation: cwc_convnet_ext.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_stream.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_micro.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_graph.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_model.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_decimal_point
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_decimal_point
Unexecuted instantiation: co.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_rand.c:ccv_decimal_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_decimal_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_decimal_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_decimal_point
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_swish.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_pool.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_compression.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_relu.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_adam.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_nms.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_blas.c:ccv_decimal_point
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_decimal_point
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_comm.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_util.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_ew.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_decimal_point
Unexecuted instantiation: ccv_nnc_norm.c:ccv_decimal_point
1028
1029
typedef struct {
1030
  float x, y, a, b;
1031
  float roll, pitch, yaw;
1032
} ccv_decimal_pose_t;
1033
1034
inline static ccv_decimal_pose_t ccv_decimal_pose(float x, float y, float a, float b, float roll, float pitch, float yaw)
1035
0
{
1036
0
  ccv_decimal_pose_t pose;
1037
0
  pose.x = x;
1038
0
  pose.y = y;
1039
0
  pose.a = a;
1040
0
  pose.b = b;
1041
0
  pose.roll = roll;
1042
0
  pose.pitch = pitch;
1043
0
  pose.yaw = yaw;
1044
0
  return pose;
1045
0
}
Unexecuted instantiation: util.tests.c:ccv_decimal_pose
Unexecuted instantiation: basic.tests.c:ccv_decimal_pose
Unexecuted instantiation: memory.tests.c:ccv_decimal_pose
Unexecuted instantiation: transform.tests.c:ccv_decimal_pose
Unexecuted instantiation: image_processing.tests.c:ccv_decimal_pose
Unexecuted instantiation: 3rdparty.tests.c:ccv_decimal_pose
Unexecuted instantiation: algebra.tests.c:ccv_decimal_pose
Unexecuted instantiation: io.tests.c:ccv_decimal_pose
Unexecuted instantiation: gradient.tests.c:ccv_decimal_pose
Unexecuted instantiation: upsample.tests.c:ccv_decimal_pose
Unexecuted instantiation: concat.tests.c:ccv_decimal_pose
Unexecuted instantiation: tensor.bind.tests.c:ccv_decimal_pose
Unexecuted instantiation: backward.tests.c:ccv_decimal_pose
Unexecuted instantiation: graph.tests.c:ccv_decimal_pose
Unexecuted instantiation: case_of.backward.tests.c:ccv_decimal_pose
Unexecuted instantiation: while.backward.tests.c:ccv_decimal_pose
Unexecuted instantiation: autograd.vector.tests.c:ccv_decimal_pose
Unexecuted instantiation: dropout.tests.c:ccv_decimal_pose
Unexecuted instantiation: custom.tests.c:ccv_decimal_pose
Unexecuted instantiation: reduce.tests.c:ccv_decimal_pose
Unexecuted instantiation: tfb.tests.c:ccv_decimal_pose
Unexecuted instantiation: batch.norm.tests.c:ccv_decimal_pose
Unexecuted instantiation: crossentropy.tests.c:ccv_decimal_pose
Unexecuted instantiation: cnnp.core.tests.c:ccv_decimal_pose
Unexecuted instantiation: symbolic.graph.tests.c:ccv_decimal_pose
Unexecuted instantiation: case_of.tests.c:ccv_decimal_pose
Unexecuted instantiation: micro.tests.c:ccv_decimal_pose
Unexecuted instantiation: compression.tests.c:ccv_decimal_pose
Unexecuted instantiation: dataframe.tests.c:ccv_decimal_pose
Unexecuted instantiation: gemm.tests.c:ccv_decimal_pose
Unexecuted instantiation: roi_align.tests.c:ccv_decimal_pose
Unexecuted instantiation: swish.tests.c:ccv_decimal_pose
Unexecuted instantiation: index.tests.c:ccv_decimal_pose
Unexecuted instantiation: minimize.tests.c:ccv_decimal_pose
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_decimal_pose
Unexecuted instantiation: autograd.tests.c:ccv_decimal_pose
Unexecuted instantiation: tensor.tests.c:ccv_decimal_pose
Unexecuted instantiation: rand.tests.c:ccv_decimal_pose
Unexecuted instantiation: while.tests.c:ccv_decimal_pose
Unexecuted instantiation: nms.tests.c:ccv_decimal_pose
Unexecuted instantiation: graph.io.tests.c:ccv_decimal_pose
Unexecuted instantiation: cblas.tests.c:ccv_decimal_pose
Unexecuted instantiation: simplify.tests.c:ccv_decimal_pose
Unexecuted instantiation: numa.tests.c:ccv_decimal_pose
Unexecuted instantiation: tape.tests.c:ccv_decimal_pose
Unexecuted instantiation: dynamic.graph.tests.c:ccv_decimal_pose
Unexecuted instantiation: layer.norm.tests.c:ccv_decimal_pose
Unexecuted instantiation: parallel.tests.c:ccv_decimal_pose
Unexecuted instantiation: winograd.tests.c:ccv_decimal_pose
Unexecuted instantiation: dataframe.addons.tests.c:ccv_decimal_pose
Unexecuted instantiation: broadcast.tests.c:ccv_decimal_pose
Unexecuted instantiation: compare.tests.c:ccv_decimal_pose
Unexecuted instantiation: smooth_l1.tests.c:ccv_decimal_pose
Unexecuted instantiation: forward.tests.c:ccv_decimal_pose
Unexecuted instantiation: output.tests.c:ccv_decimal_pose
Unexecuted instantiation: convnet.tests.c:ccv_decimal_pose
Unexecuted instantiation: numeric.tests.c:ccv_decimal_pose
Unexecuted instantiation: defects.l0.1.tests.c:ccv_decimal_pose
Unexecuted instantiation: cublas.tests.c:ccv_decimal_pose
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_decimal_pose
Unexecuted instantiation: imdb.tests.c:ccv_decimal_pose
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_decimal_pose
Unexecuted instantiation: random.tests.c:ccv_decimal_pose
Unexecuted instantiation: cudnn.tests.c:ccv_decimal_pose
Unexecuted instantiation: dense.net.tests.c:ccv_decimal_pose
Unexecuted instantiation: cifar.tests.c:ccv_decimal_pose
Unexecuted instantiation: rmsprop.tests.c:ccv_decimal_pose
Unexecuted instantiation: sgd.tests.c:ccv_decimal_pose
Unexecuted instantiation: nccl.tests.c:ccv_decimal_pose
Unexecuted instantiation: schedule.tests.c:ccv_decimal_pose
Unexecuted instantiation: loss.tests.c:ccv_decimal_pose
Unexecuted instantiation: adam.tests.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cache.c:ccv_decimal_pose
Unexecuted instantiation: ccv_memory.c:ccv_decimal_pose
Unexecuted instantiation: ccv_io.c:ccv_decimal_pose
Unexecuted instantiation: ccv_numeric.c:ccv_decimal_pose
Unexecuted instantiation: ccv_algebra.c:ccv_decimal_pose
Unexecuted instantiation: ccv_util.c:ccv_decimal_pose
Unexecuted instantiation: ccv_basic.c:ccv_decimal_pose
Unexecuted instantiation: ccv_image_processing.c:ccv_decimal_pose
Unexecuted instantiation: ccv_resample.c:ccv_decimal_pose
Unexecuted instantiation: ccv_transform.c:ccv_decimal_pose
Unexecuted instantiation: ccv_classic.c:ccv_decimal_pose
Unexecuted instantiation: ccv_convnet.c:ccv_decimal_pose
Unexecuted instantiation: ccv_output.c:ccv_decimal_pose
Unexecuted instantiation: cwc_convnet_ext.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_stream.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_micro.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_graph.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_model.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_decimal_pose
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_decimal_pose
Unexecuted instantiation: co.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_rand.c:ccv_decimal_pose
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_decimal_pose
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_decimal_pose
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_decimal_pose
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_swish.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_pool.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_compression.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_relu.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_adam.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_nms.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_blas.c:ccv_decimal_pose
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_decimal_pose
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_comm.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_util.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_ew.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_decimal_pose
Unexecuted instantiation: ccv_nnc_norm.c:ccv_decimal_pose
1046
1047
typedef struct {
1048
  ccv_rect_t rect;
1049
  int size;
1050
  ccv_array_t* set;
1051
  long m10, m01, m11, m20, m02;
1052
} ccv_contour_t;
1053
1054
/**
1055
 * Create a new contour object.
1056
 * @param set The initial capacity of the contour.
1057
 */
1058
ccv_contour_t* ccv_contour_new(int set);
1059
/**
1060
 * Push a point into the contour object.
1061
 * @param contour The contour.
1062
 * @param point The point.
1063
 */
1064
void ccv_contour_push(ccv_contour_t* contour, ccv_point_t point);
1065
/**
1066
 * Free up the contour object.
1067
 * @param contour The contour.
1068
 */
1069
void ccv_contour_free(ccv_contour_t* contour);
1070
/** @} */
1071
1072
/* numerical algorithms ccv_numeric.c */
1073
/**
1074
 * @defgroup ccv_numeric numerical algorithms
1075
 * @{
1076
 */
1077
1078
/* clarification about algebra and numerical algorithms:
1079
 * when using the word "algebra", I assume the operation is well established in Mathematic sense
1080
 * and can be calculated with a straight-forward, finite sequence of operation. The "numerical"
1081
 * in other word, refer to a class of algorithm that can only approximate/or iteratively found the
1082
 * solution. Thus, "invert" would be classified as numerical because of the sense that in some case,
1083
 * it can only be "approximate" (in least-square sense), so to "solve". */
1084
1085
void ccv_invert(ccv_matrix_t* a, ccv_matrix_t** b, int type);
1086
void ccv_solve(ccv_matrix_t* a, ccv_matrix_t* b, ccv_matrix_t** d, int type);
1087
void ccv_eigen(ccv_dense_matrix_t* a, ccv_dense_matrix_t** vector, ccv_dense_matrix_t** lambda, int type, double epsilon);
1088
1089
typedef struct {
1090
  double interp; /**< Interpolate value. */
1091
  double extrap; /**< Extrapolate value. */
1092
  int max_iter; /**< Maximum iterations. */
1093
  double ratio; /**< Increase ratio. */
1094
  double rho; /**< Decrease ratio. */
1095
  double sig; /**< Sigma. */
1096
} ccv_minimize_param_t;
1097
1098
extern const ccv_minimize_param_t ccv_minimize_default_params;
1099
1100
typedef int(*ccv_minimize_f)(const ccv_dense_matrix_t* x, double* f, ccv_dense_matrix_t* df, void*);
1101
/**
1102
 * Linear-search to minimize function with partial derivatives. It is formed after [minimize.m](http://www.gatsby.ucl.ac.uk/~edward/code/minimize/example.html).
1103
 * @param x The input vector.
1104
 * @param length The length of line.
1105
 * @param red The step size.
1106
 * @param func (int ccv_minimize_f)(const ccv_dense_matrix_t* x, double* f, ccv_dense_matrix_t* df, void* data). Compute the function value, and its partial derivatives.
1107
 * @param params A **ccv_minimize_param_t** structure that defines various aspect of the minimize function.
1108
 * @param data Any extra user data.
1109
 */
1110
void ccv_minimize(ccv_dense_matrix_t* x, int length, double red, ccv_minimize_f func, ccv_minimize_param_t params, void* data);
1111
/**
1112
 * Convolve on dense matrix a with dense matrix b. This function has a soft dependency on [FFTW3](http://fftw.org/). If no FFTW3 exists, ccv will use [KissFFT](http://sourceforge.net/projects/kissfft/) shipped with it. FFTW3 is about 35% faster than KissFFT.
1113
 * @param a Dense matrix a.
1114
 * @param b Dense matrix b.
1115
 * @param d The output matrix.
1116
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1117
 * @param padding_pattern ccv doesn't support padding pattern for now.
1118
 */
1119
void ccv_filter(ccv_dense_matrix_t* a, ccv_dense_matrix_t* b, ccv_dense_matrix_t** d, int type, int padding_pattern);
1120
typedef double(*ccv_filter_kernel_f)(double x, double y, void*);
1121
/**
1122
 * Fill a given dense matrix with a kernel function.
1123
 * @param x The matrix to be filled with.
1124
 * @param func (double ccv_filter_kernel_f(double x, double y, void* data), compute the value with given x, y.
1125
 * @param data Any extra user data.
1126
 */
1127
void ccv_filter_kernel(ccv_dense_matrix_t* x, ccv_filter_kernel_f func, void* data);
1128
1129
/* modern numerical algorithms */
1130
/**
1131
 * [Distance transform](https://en.wikipedia.org/wiki/Distance_transform). The current implementation follows [Distance Transforms of Sampled Functions](http://www.cs.cornell.edu/~dph/papers/dt.pdf). The dynamic programming technique has O(n) time complexity.
1132
 * @param a The input matrix.
1133
 * @param b The output matrix.
1134
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1135
 * @param x The x coordinate offset.
1136
 * @param x_type The type of output x coordinate offset, if 0, ccv will default to CCV_32S | CCV_C1.
1137
 * @param y The y coordinate offset.
1138
 * @param y_type The type of output x coordinate offset, if 0, ccv will default to CCV_32S | CCV_C1.
1139
 * @param dx The x coefficient.
1140
 * @param dy The y coefficient.
1141
 * @param dxx The x^2 coefficient.
1142
 * @param dyy The y^2 coefficient.
1143
 * @param flag CCV_GSEDT, generalized squared Euclidean distance transform. CCV_NEGATIVE, negate value in input matrix for computation; effectively, this enables us to compute the maximum distance transform rather than minimum (default one).
1144
 */
1145
void ccv_distance_transform(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, ccv_dense_matrix_t** x, int x_type, ccv_dense_matrix_t** y, int y_type, double dx, double dy, double dxx, double dyy, int flag);
1146
/** @} */
1147
void ccv_sparse_coding(ccv_matrix_t* x, int k, ccv_matrix_t** A, int typeA, ccv_matrix_t** y, int typey);
1148
void ccv_compressive_sensing_reconstruct(ccv_matrix_t* a, ccv_matrix_t* x, ccv_matrix_t** y, int type);
1149
1150
/**
1151
 * @defgroup ccv_basic basic image pre-processing utilities
1152
 * The utilities in this file provides basic pre-processing which, most-likely, are the first steps for computer vision algorithms.
1153
 * @{
1154
 */
1155
1156
/**
1157
 * Compute image with [Sobel operator](https://en.wikipedia.org/wiki/Sobel_operator).
1158
 * @param a The input matrix.
1159
 * @param b The output matrix.
1160
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1161
 * @param dx The window size of Sobel operator on x-axis, specially optimized for 1, 3
1162
 * @param dy The window size of Sobel operator on y-axis, specially optimized for 1, 3
1163
 */
1164
void ccv_sobel(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int dx, int dy);
1165
/**
1166
 * Compute the gradient (angle and magnitude) at each pixel.
1167
 * @param a The input matrix.
1168
 * @param theta The output matrix of angle at each pixel.
1169
 * @param ttype The type of output matrix, if 0, ccv will defaults to CCV_32F.
1170
 * @param m The output matrix of magnitude at each pixel.
1171
 * @param mtype The type of output matrix, if 0, ccv will defaults to CCV_32F.
1172
 * @param dx The window size of the underlying Sobel operator used on x-axis, specially optimized for 1, 3
1173
 * @param dy The window size of the underlying Sobel operator used on y-axis, specially optimized for 1, 3
1174
 */
1175
void ccv_gradient(ccv_dense_matrix_t* a, ccv_dense_matrix_t** theta, int ttype, ccv_dense_matrix_t** m, int mtype, int dx, int dy);
1176
1177
enum {
1178
  CCV_FLIP_X = 0x01,
1179
  CCV_FLIP_Y = 0x02,
1180
};
1181
/**
1182
 * Flip the matrix by x-axis, y-axis or both.
1183
 * @param a The input matrix.
1184
 * @param b The output matrix (it is in-place safe).
1185
 * @param btype The type of output matrix, if 0, ccv will use the sample type as the input matrix.
1186
 * @param type CCV_FLIP_X - flip around x-axis, CCV_FLIP_Y - flip around y-axis.
1187
 */
1188
void ccv_flip(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int btype, int type);
1189
/**
1190
 * Using [Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur) on a given matrix. It implements a O(n * sqrt(m)) algorithm, n is the size of input matrix, m is the size of Gaussian filtering kernel.
1191
 * @param a The input matrix.
1192
 * @param b The output matrix.
1193
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1194
 * @param sigma The sigma factor in Gaussian filtering kernel.
1195
 */
1196
void ccv_blur(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, double sigma);
1197
/** @} */
1198
1199
/**
1200
 * @defgroup ccv_image_processing image processing utilities
1201
 * The utilities in this file provides image processing methods that are widely used for image enhancements.
1202
 * @{
1203
 */
1204
1205
enum {
1206
  CCV_RGB_TO_YUV = 0x01,
1207
};
1208
1209
/**
1210
 * Convert matrix from one color space representation to another.
1211
 * @param a The input matrix.
1212
 * @param b The output matrix.
1213
 * @param type The type of output matrix, if 0, ccv will use the sample type as the input matrix.
1214
 * @param flag **CCV_RGB_TO_YUV** to convert from RGB color space to YUV color space.
1215
 */
1216
void ccv_color_transform(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int flag);
1217
/**
1218
 * Manipulate image's saturation.
1219
 * @param a The input matrix.
1220
 * @param b The output matrix (it is in-place safe).
1221
 * @param type The type of output matrix, if 0, ccv will use the sample type as the input matrix.
1222
 * @param ds The coefficient (0: grayscale, 1: original).
1223
 */
1224
void ccv_saturation(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, double ds);
1225
/**
1226
 * Manipulate image's contrast.
1227
 * @param a The input matrix.
1228
 * @param b The output matrix (it is in-place safe).
1229
 * @param type The type of output matrix, if 0, ccv will use the sample type as the input matrix.
1230
 * @param ds The coefficient (0: mean image, 1: original).
1231
 */
1232
void ccv_contrast(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, double ds);
1233
/** @} */
1234
1235
/**
1236
 * @defgroup ccv_resample image resampling utilities
1237
 * @{
1238
 */
1239
1240
enum {
1241
  CCV_INTER_AREA    = 0x01,
1242
  CCV_INTER_LINEAR  = 0X02,
1243
  CCV_INTER_CUBIC   = 0X04,
1244
  CCV_INTER_LANCZOS = 0X08,
1245
};
1246
1247
/**
1248
 * Resample a given matrix to different size, as for now, ccv only supports either downsampling (with CCV_INTER_AREA) or upsampling (with CCV_INTER_CUBIC).
1249
 * @param a The input matrix.
1250
 * @param b The output matrix.
1251
 * @param btype The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1252
 * @param rows The new row.
1253
 * @param cols The new column.
1254
 * @param type For now, ccv supports CCV_INTER_AREA, which is an extension to [bilinear resampling](https://en.wikipedia.org/wiki/Bilinear_filtering) for downsampling and CCV_INTER_CUBIC [bicubic resampling](https://en.wikipedia.org/wiki/Bicubic_interpolation) for upsampling.
1255
 */
1256
void ccv_resample(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int btype, int rows, int cols, int type);
1257
/**
1258
 * Downsample a given matrix to exactly half size with a [Gaussian filter](https://en.wikipedia.org/wiki/Gaussian_filter). The half size is approximated by floor(rows * 0.5) x floor(cols * 0.5).
1259
 * @param a The input matrix.
1260
 * @param b The output matrix.
1261
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1262
 * @param src_x Shift the start point by src_x.
1263
 * @param src_y Shift the start point by src_y.
1264
 */
1265
void ccv_sample_down(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int src_x, int src_y);
1266
/**
1267
 * Upsample a given matrix to exactly double size with a [Gaussian filter](https://en.wikipedia.org/wiki/Gaussian_filter).
1268
 * @param a The input matrix.
1269
 * @param b The output matrix.
1270
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1271
 * @param src_x Shift the start point by src_x.
1272
 * @param src_y Shift the start point by src_y.
1273
 */
1274
void ccv_sample_up(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int src_x, int src_y);
1275
/** @} */
1276
1277
/**
1278
 * @defgroup ccv_transform image transform utilities
1279
 * @{
1280
 */
1281
1282
/**
1283
 * Similar to ccv_slice, it will slice a given matrix into required rows / cols, but it will interpolate the value with bilinear filter if x and y is non-integer.
1284
 * @param a The given matrix that will be sliced
1285
 * @param b The output matrix
1286
 * @param type The type of output matrix
1287
 * @param y The top point to slice
1288
 * @param x The left point to slice
1289
 * @param rows The number of rows for destination matrix
1290
 * @param cols The number of cols for destination matrix
1291
 */
1292
void ccv_decimal_slice(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, float y, float x, int rows, int cols);
1293
/**
1294
 * Apply a [3D transform](https://en.wikipedia.org/wiki/Perspective_transform#Perspective_projection) against the given point in a given image size, assuming field of view is 60 (in degree).
1295
 * @param point The point to be transformed in decimal
1296
 * @param size The image size
1297
 * @param m00, m01, m02, m10, m11, m12, m20, m21, m22 The transformation matrix
1298
 */
1299
ccv_decimal_point_t ccv_perspective_transform_apply(ccv_decimal_point_t point, ccv_size_t size, float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22);
1300
/**
1301
 * Apply a [3D transform](https://en.wikipedia.org/wiki/Perspective_transform#Perspective_projection) on a given matrix, assuming field of view is 60 (in degree).
1302
 * @param a The given matrix to be transformed
1303
 * @param b The output matrix
1304
 * @param type The type of output matrix
1305
 * @param m00, m01, m02, m10, m11, m12, m20, m21, m22 The transformation matrix
1306
 */
1307
void ccv_perspective_transform(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22);
1308
/** @} */
1309
1310
/* classic computer vision algorithms ccv_classic.c */
1311
/**
1312
 * @defgroup ccv_classic classic computer vision algorithms
1313
 * @{
1314
 */
1315
1316
/**
1317
 * [Histogram-of-Oriented-Gradients](https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients) implementation, specifically, it implements the HOG described in *Object Detection with Discriminatively Trained Part-Based Models, Pedro F. Felzenszwalb, Ross B. Girshick, David McAllester and Deva Ramanan*.
1318
 * @param a The input matrix.
1319
 * @param b The output matrix.
1320
 * @param b_type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1321
 * @param sbin The number of bins for orientation (default to 9, thus, for **b**, it will have 9 * 2 + 9 + 4 = 31 channels).
1322
 * @param size The window size for HOG (default to 8)
1323
 */
1324
void ccv_hog(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int b_type, int sbin, int size);
1325
/**
1326
 * [Canny edge detector](https://en.wikipedia.org/wiki/Canny_edge_detector) implementation. For performance reason, this is a clean-up reimplementation of OpenCV's Canny edge detector, it has very similar performance characteristic as the OpenCV one. As of today, ccv's Canny edge detector only works with CCV_8U or CCV_32S dense matrix type.
1327
 * @param a The input matrix.
1328
 * @param b The output matrix.
1329
 * @param type The type of output matrix, if 0, ccv will create a CCV_8U | CCV_C1 matrix.
1330
 * @param size The underlying Sobel filter size.
1331
 * @param low_thresh The low threshold that makes the point interesting.
1332
 * @param high_thresh The high threshold that makes the point acceptable.
1333
 */
1334
void ccv_canny(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int size, double low_thresh, double high_thresh);
1335
void ccv_close_outline(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type);
1336
/* range: exclusive, return value: inclusive (i.e., threshold = 5, 0~5 is background, 6~range-1 is foreground */
1337
/**
1338
 * [OTSU](https://en.wikipedia.org/wiki/Otsu%27s_method) implementation.
1339
 * @param a The input matrix.
1340
 * @param outvar The inter-class variance.
1341
 * @param range The maximum range of data in the input matrix.
1342
 * @return The threshold, inclusively. e.g. 5 means 0~5 is in the background, and 6~255 is in the foreground.
1343
 */
1344
int ccv_otsu(ccv_dense_matrix_t* a, double* outvar, int range);
1345
1346
typedef struct {
1347
  ccv_decimal_point_t point;
1348
  uint8_t status;
1349
} ccv_decimal_point_with_status_t;
1350
1351
/**
1352
 * [Lucas Kanade](https://en.wikipedia.org/wiki/Lucas%E2%80%93Kanade_Optical_Flow_Method) optical flow implementation with image pyramid extension.
1353
 * @param a The first frame
1354
 * @param b The next frame
1355
 * @param point_a The points in first frame, of **ccv_decimal_point_t** type
1356
 * @param point_b The output points in the next frame, of **ccv_decimal_point_with_status_t** type
1357
 * @param win_size The window size to compute each optical flow, it must be a odd number
1358
 * @param level How many image pyramids to be used for the computation
1359
 * @param min_eigen The minimal eigen-value to pass optical flow computation
1360
 */
1361
void ccv_optical_flow_lucas_kanade(ccv_dense_matrix_t* a, ccv_dense_matrix_t* b, ccv_array_t* point_a, ccv_array_t** point_b, ccv_size_t win_size, int level, double min_eigen);
1362
/** @} */
1363
1364
/* modern computer vision algorithms */
1365
/* SIFT, DAISY, SWT, MSER, DPM, BBF, SGF, SSD, FAST */
1366
1367
/**
1368
 * @defgroup ccv_daisy DAISY
1369
 * @{
1370
 */
1371
1372
/* daisy related methods */
1373
typedef struct {
1374
  double radius; /**< the Gaussian radius. */
1375
  int rad_q_no;
1376
  int th_q_no;
1377
  int hist_th_q_no;
1378
  float normalize_threshold;
1379
  int normalize_method;
1380
} ccv_daisy_param_t;
1381
1382
enum {
1383
  CCV_DAISY_NORMAL_PARTIAL = 0x01,
1384
  CCV_DAISY_NORMAL_FULL    = 0x02,
1385
  CCV_DAISY_NORMAL_SIFT    = 0x03,
1386
};
1387
1388
/**
1389
 * [DAISY](http://cvlab.epfl.ch/publications/publications/2010/TolaLF10a.pdf) implementation. For more details - DAISY: An Efficient Dense Descriptor Applied to Wide-Baseline Stereo.
1390
 * @param a The input matrix.
1391
 * @param b The output matrix.
1392
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
1393
 * @param params A **ccv_daisy_param_t** structure that defines various aspect of the feature extractor.
1394
 */
1395
void ccv_daisy(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, ccv_daisy_param_t params);
1396
/** @} */
1397
1398
/* sift related methods */
1399
/**
1400
 * @defgroup ccv_sift scale invariant feature transform
1401
 * @{
1402
 */
1403
typedef struct {
1404
  float x, y;
1405
  int octave;
1406
  int level;
1407
  union {
1408
    struct {
1409
      double a, b;
1410
      double c, d;
1411
    } affine;
1412
    struct {
1413
      double scale;
1414
      double angle;
1415
    } regular;
1416
  };
1417
} ccv_keypoint_t;
1418
1419
typedef struct {
1420
  int up2x; /**< If upscale the image for better SIFT accuracy. */
1421
  int noctaves; /**< Number of octaves. */
1422
  int nlevels; /**< Number of levels for each octaves. */
1423
  float edge_threshold; /**< Above this threshold, it will be recognized as edge otherwise be ignored. */
1424
  float peak_threshold; /**< Above this threshold, it will be recognized as potential feature point. */
1425
  float norm_threshold; /**< If norm of the descriptor is smaller than threshold, it will be ignored. */
1426
} ccv_sift_param_t;
1427
1428
extern const ccv_sift_param_t ccv_sift_default_params;
1429
1430
/**
1431
 * Compute [SIFT](https://en.wikipedia.org/wiki/Scale-invariant_feature_transform) key-points.
1432
 * @param a The input matrix.
1433
 * @param keypoints The array of key-points, a ccv_keypoint_t structure.
1434
 * @param desc The descriptor for each key-point.
1435
 * @param type The type of the descriptor, if 0, ccv will default to CCV_32F.
1436
 * @param params A **ccv_sift_param_t** structure that defines various aspect of SIFT function.
1437
 */
1438
void ccv_sift(ccv_dense_matrix_t* a, ccv_array_t** keypoints, ccv_dense_matrix_t** desc, int type, ccv_sift_param_t params);
1439
/** @} */
1440
1441
/* mser related method */
1442
1443
typedef struct {
1444
  /* parameters for MSER */
1445
  int delta;
1446
  int min_area; /* default: 60 */
1447
  int direction; /* default: 0, 0 for both, -1 for bright to dark, 1 for dark to bright */
1448
  int max_area;
1449
  double max_variance;
1450
  double min_diversity;
1451
  int range; /* from 0 to range, inclusive */
1452
  /* parameters for MSCR */
1453
  double area_threshold; /* default: 1.01 */
1454
  double min_margin; /* default: 0.003 */
1455
  int max_evolution;
1456
  double edge_blur_sigma; /* default: 1.0 */
1457
} ccv_mser_param_t;
1458
1459
typedef struct {
1460
  ccv_rect_t rect;
1461
  int size;
1462
  long m10, m01, m11, m20, m02;
1463
  ccv_point_t keypoint;
1464
} ccv_mser_keypoint_t;
1465
1466
enum {
1467
  CCV_BRIGHT_TO_DARK = -1,
1468
  CCV_DARK_TO_BRIGHT = 1,
1469
};
1470
1471
CCV_WARN_UNUSED(ccv_array_t*) ccv_mser(ccv_dense_matrix_t* a, ccv_dense_matrix_t* h, ccv_dense_matrix_t** b, int type, ccv_mser_param_t params);
1472
1473
/* swt related method: stroke width transform is relatively new, typically used in text detection */
1474
/**
1475
 * @defgroup ccv_swt stroke width transform
1476
 * @{
1477
 */
1478
typedef struct {
1479
  int interval; /**< Intervals for scale invariant option. */
1480
  int min_neighbors; /**< Minimal neighbors to make a detection valid, this is for scale-invariant version. */
1481
  int scale_invariant; /**< Enable scale invariant swt (to scale to different sizes and then combine the results) */
1482
  int direction; /**< SWT direction. (black to white or white to black). */
1483
  double same_word_thresh[2]; /**< Overlapping more than 0.1 of the bigger one (0), and 0.9 of the smaller one (1) */
1484
  /**
1485
   * @name Canny parameters
1486
   * @{
1487
   */
1488
  int size; /**< Parameters for [Canny edge detector](/lib/ccv-classic). */
1489
  int low_thresh; /**< Parameters for [Canny edge detector](/lib/ccv-classic). */
1490
  int high_thresh; /**< Parameters for [Canny edge detector](/lib/ccv-classic). */
1491
  /** @} */
1492
  /**
1493
   * @name Geometry filtering parameters
1494
   * @{
1495
   */
1496
  int max_height; /**< The maximum height for a letter. */
1497
  int min_height; /**< The minimum height for a letter. */
1498
  int min_area; /**< The minimum occupied area for a letter. */
1499
  int letter_occlude_thresh;
1500
  double aspect_ratio; /**< The maximum aspect ratio for a letter. */
1501
  double std_ratio; /**< The inner-class standard derivation when grouping letters. */
1502
  /** @} */
1503
  /**
1504
   * @name Grouping parameters
1505
   * @{
1506
   */
1507
  double thickness_ratio; /**< The allowable thickness variance when grouping letters. */
1508
  double height_ratio; /**< The allowable height variance when grouping letters. */
1509
  int intensity_thresh; /**< The allowable intensity variance when grouping letters. */
1510
  double distance_ratio; /**< The allowable distance variance when grouping letters. */
1511
  double intersect_ratio; /**< The allowable intersect variance when grouping letters. */
1512
  double elongate_ratio; /**< The allowable elongate variance when grouping letters. */
1513
  int letter_thresh; /**< The allowable letter threshold. */
1514
  /** @} */
1515
  /**
1516
   * @name Break textline into words
1517
   * @{
1518
   */
1519
  int breakdown; /**< If breakdown text line into words. */
1520
  double breakdown_ratio; /**< Apply [OSTU](/lib/ccv-classic) and if inter-class variance above the threshold, it will be break down into words. */
1521
  /** @} */
1522
} ccv_swt_param_t;
1523
1524
extern const ccv_swt_param_t ccv_swt_default_params;
1525
1526
/**
1527
 * Compute the Stroke-Width-Transform image.
1528
 * @param a The input matrix.
1529
 * @param b The output matrix.
1530
 * @param type The type of the output matrix, if 0, ccv will default to CCV_32S | CCV_C1.
1531
 * @param params A **ccv_swt_param_t** structure that defines various aspect of the SWT function.
1532
 */
1533
void ccv_swt(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, ccv_swt_param_t params);
1534
/**
1535
 * Return array of regions that are potentially text area.
1536
 * @param a The input matrix.
1537
 * @param params A **ccv_swt_param_t** structure that defines various aspect of the SWT function.
1538
 * @return A **ccv_array_t** of **ccv_comp_t** with detection results.
1539
 */
1540
CCV_WARN_UNUSED(ccv_array_t*) ccv_swt_detect_words(ccv_dense_matrix_t* a, ccv_swt_param_t params);
1541
1542
/* it makes sense now to include a simple data structure that encapsulate the common idiom of
1543
 * having file name with a bounding box */
1544
1545
typedef struct {
1546
  char* filename;
1547
  union {
1548
    ccv_decimal_rect_t bbox;
1549
    ccv_decimal_pose_t pose;
1550
  };
1551
} ccv_file_info_t;
1552
1553
/* I'd like to include Deformable Part Models as a general object detection method in here
1554
 * The difference between BBF and DPM:
1555
 * ~ BBF is for rigid object detection: banners, box, faces etc.
1556
 * ~ DPM is more generalized, can detect people, car, bike (larger inner-class difference) etc.
1557
 * ~ BBF is blazing fast (few milliseconds), DPM is relatively slow (around 1 seconds or so) */
1558
1559
/**
1560
 * @defgroup ccv_dpm deformable parts model
1561
 * @{
1562
 */
1563
1564
#define CCV_DPM_PART_MAX (10)
1565
1566
typedef struct {
1567
  int id;
1568
  float confidence;
1569
} ccv_classification_t;
1570
1571
typedef struct {
1572
  ccv_rect_t rect;
1573
  int neighbors;
1574
  ccv_classification_t classification;
1575
} ccv_comp_t;
1576
1577
typedef struct {
1578
  ccv_rect_t rect;
1579
  int neighbors;
1580
  ccv_classification_t classification;
1581
  int pnum;
1582
  ccv_comp_t part[CCV_DPM_PART_MAX];
1583
} ccv_root_comp_t;
1584
1585
typedef struct {
1586
  ccv_dense_matrix_t* w;
1587
  double dx, dy, dxx, dyy;
1588
  int x, y, z;
1589
  int counterpart;
1590
  float alpha[6];
1591
} ccv_dpm_part_classifier_t;
1592
1593
typedef struct {
1594
  int count;
1595
  ccv_dpm_part_classifier_t root;
1596
  ccv_dpm_part_classifier_t* part;
1597
  float alpha[3], beta;
1598
} ccv_dpm_root_classifier_t;
1599
1600
typedef struct {
1601
  int count;
1602
  ccv_dpm_root_classifier_t* root;
1603
} ccv_dpm_mixture_model_t;
1604
1605
typedef struct {
1606
  int interval; /**< Interval images between the full size image and the half size one. e.g. 2 will generate 2 images in between full size image and half size one: image with full size, image with 5/6 size, image with 2/3 size, image with 1/2 size. */
1607
  int min_neighbors; /**< 0: no grouping afterwards. 1: group objects that intersects each other. > 1: group objects that intersects each other, and only passes these that have at least **min_neighbors** intersected objects. */
1608
  int flags; /**< CCV_DPM_NO_NESTED, if one class of object is inside another class of object, this flag will reject the first object. */
1609
  float threshold; /**< The threshold the determines the acceptance of an object. */
1610
} ccv_dpm_param_t;
1611
1612
typedef struct {
1613
  int components; /**< The number of root filters in the mixture model. */
1614
  int parts; /**< The number of part filters for each root filter. */
1615
  int grayscale; /**< Whether to exploit color in a given image. */
1616
  int symmetric; /**< Whether to exploit symmetric property of the object. */
1617
  int min_area; /**< The minimum area that one part classifier can occupy, 3000 is a reasonable number. */
1618
  int max_area; /**< The maximum area that one part classifier can occupy. 5000 is a reasonable number. */
1619
  int iterations; /**< How many iterations needed for stochastic gradient descent. */
1620
  int data_minings; /**< How many data mining procedures are needed for discovering hard examples. */
1621
  int root_relabels; /**< How many relabel procedures for root classifier are needed. */
1622
  int relabels; /**< How many relabel procedures are needed. */
1623
  int discard_estimating_constant; // 1
1624
  int negative_cache_size; /**< The cache size for negative examples. 1000 is a reasonable number. */
1625
  double include_overlap; /**< The percentage of overlap between expected bounding box and the bounding box from detection. Beyond this threshold, it is ensured to be the same object. 0.7 is a reasonable number. */
1626
  double alpha; /**< The step size for stochastic gradient descent. */
1627
  double alpha_ratio; /**< Decrease the step size for each iteration. 0.85 is a reasonable number. */
1628
  double balance; /**< To balance the weight of positive examples and negative examples. 1.5 is a reasonable number. */
1629
  double C; /**< C in SVM. */
1630
  double percentile_breakdown; /**< The percentile use for breakdown threshold. 0.05 is the default. */
1631
  ccv_dpm_param_t detector; /**< A **ccv_dpm_params_t** structure that will be used to search positive examples and negative examples from background images. */
1632
} ccv_dpm_new_param_t;
1633
1634
enum {
1635
  CCV_DPM_NO_NESTED = 0x10000000,
1636
};
1637
1638
extern const ccv_dpm_param_t ccv_dpm_default_params;
1639
1640
/**
1641
 * Create a new DPM mixture model from given positive examples and background images. This function has hard dependencies on [GSL](http://www.gnu.org/software/gsl/) and [LibLinear](http://www.csie.ntu.edu.tw/~cjlin/liblinear/).
1642
 * @param posfiles An array of positive images.
1643
 * @param bboxes An array of bounding boxes for positive images.
1644
 * @param posnum Number of positive examples.
1645
 * @param bgfiles An array of background images.
1646
 * @param bgnum Number of background images.
1647
 * @param negnum Number of negative examples that is harvested from background images.
1648
 * @param dir The working directory to store/retrieve intermediate data.
1649
 * @param params A **ccv_dpm_new_param_t** structure that defines various aspects of the training function.
1650
 */
1651
void ccv_dpm_mixture_model_new(char** posfiles, ccv_rect_t* bboxes, int posnum, char** bgfiles, int bgnum, int negnum, const char* dir, ccv_dpm_new_param_t params);
1652
/**
1653
 * Using a DPM mixture model to detect objects in a given image. If you have several DPM mixture models, it is better to use them in one method call. In this way, ccv will try to optimize the overall performance.
1654
 * @param a The input image.
1655
 * @param model An array of mixture models.
1656
 * @param count How many mixture models you've passed in.
1657
 * @param params A **ccv_dpm_param_t** structure that defines various aspects of the detector.
1658
 * @return A **ccv_array_t** of **ccv_root_comp_t** that contains the root bounding box as well as its parts.
1659
 */
1660
CCV_WARN_UNUSED(ccv_array_t*) ccv_dpm_detect_objects(ccv_dense_matrix_t* a, ccv_dpm_mixture_model_t** model, int count, ccv_dpm_param_t params);
1661
/**
1662
 * Read DPM mixture model from a model file.
1663
 * @param directory The model file for DPM mixture model.
1664
 * @return A DPM mixture model, 0 if no valid DPM mixture model available.
1665
 */
1666
CCV_WARN_UNUSED(ccv_dpm_mixture_model_t*) ccv_dpm_read_mixture_model(const char* directory);
1667
/**
1668
 * Free up the memory of DPM mixture model.
1669
 * @param model The DPM mixture model.
1670
 */
1671
void ccv_dpm_mixture_model_free(ccv_dpm_mixture_model_t* model);
1672
/** @} */
1673
1674
/**
1675
 * @defgroup ccv_bbf binary brightness feature
1676
 * this is open source implementation of object detection algorithm: brightness binary feature
1677
 * it is an extension/modification of original HAAR-like feature with Adaboost, featured faster
1678
 * computation and higher accuracy (current highest accuracy close-source face detector is based
1679
 * on the same algorithm)
1680
 * @{
1681
 */
1682
1683
#define CCV_BBF_POINT_MAX (8)
1684
#define CCV_BBF_POINT_MIN (3)
1685
1686
typedef struct {
1687
  int size;
1688
  int px[CCV_BBF_POINT_MAX];
1689
  int py[CCV_BBF_POINT_MAX];
1690
  int pz[CCV_BBF_POINT_MAX];
1691
  int nx[CCV_BBF_POINT_MAX];
1692
  int ny[CCV_BBF_POINT_MAX];
1693
  int nz[CCV_BBF_POINT_MAX];
1694
} ccv_bbf_feature_t;
1695
1696
typedef struct {
1697
  int count;
1698
  float threshold;
1699
  ccv_bbf_feature_t* feature;
1700
  float* alpha;
1701
} ccv_bbf_stage_classifier_t;
1702
1703
typedef struct {
1704
  int count;
1705
  ccv_size_t size;
1706
  ccv_bbf_stage_classifier_t* stage_classifier;
1707
} ccv_bbf_classifier_cascade_t;
1708
1709
enum {
1710
  CCV_BBF_GENETIC_OPT = 0x01,
1711
  CCV_BBF_FLOAT_OPT = 0x02,
1712
};
1713
1714
typedef struct {
1715
  int interval; /**< Interval images between the full size image and the half size one. e.g. 2 will generate 2 images in between full size image and half size one: image with full size, image with 5/6 size, image with 2/3 size, image with 1/2 size. */
1716
  int min_neighbors; /**< 0: no grouping afterwards. 1: group objects that intersects each other. > 1: group objects that intersects each other, and only passes these that have at least **min_neighbors** intersected objects. */
1717
  int flags; /**< CCV_BBF_NO_NESTED, if one class of object is inside another class of object, this flag will reject the first object. */
1718
  int accurate; /**< BBF will generates 4 spatial scale variations for better accuracy. Set this parameter to 0 will reduce to 1 scale variation, and thus 3 times faster but lower the general accuracy of the detector. */
1719
  ccv_size_t size; /**< The smallest object size that will be interesting to us. */
1720
} ccv_bbf_param_t;
1721
1722
typedef struct {
1723
  double pos_crit; /**< Positive criteria or the targeted recall ratio, BBF classifier tries to adjust the constant to meet this criteria. */
1724
  double neg_crit; /**< Negative criteria or the targeted reject ratio, BBF classifier tries to include more weak features until meet this criteria. */
1725
  double balance_k; /**< Weight positive examples differently from negative examples. */
1726
  int layer; /**< The maximum layer trained for the classifier cascade. */
1727
  int feature_number; /**< The maximum feature number for each classifier. */
1728
  int optimizer; /**< CCV_BBF_GENETIC_OPT, using genetic algorithm to search the best weak feature; CCV_BBF_FLOAT_OPT, using float search to improve the found best weak feature. */
1729
  ccv_bbf_param_t detector; /**< A **ccv_bbf_params_t** structure that will be used to search negative examples from background images. */
1730
} ccv_bbf_new_param_t;
1731
1732
enum {
1733
  CCV_BBF_NO_NESTED = 0x10000000,
1734
};
1735
1736
extern const ccv_bbf_param_t ccv_bbf_default_params;
1737
1738
/**
1739
 * Create a new BBF classifier cascade from given positive examples and background images. This function has a hard dependency on [GSL](http://www.gnu.org/software/gsl/).
1740
 * @param posimg An array of positive examples.
1741
 * @param posnum Number of positive examples.
1742
 * @param bgfiles An array of background images.
1743
 * @param bgnum Number of background images.
1744
 * @param negnum Number of negative examples that is harvested from background images.
1745
 * @param size The image size of positive examples.
1746
 * @param dir The working directory to store/retrieve intermediate data.
1747
 * @param params A **ccv_bbf_new_param_t** structure that defines various aspects of the training function.
1748
 */
1749
void ccv_bbf_classifier_cascade_new(ccv_dense_matrix_t** posimg, int posnum, char** bgfiles, int bgnum, int negnum, ccv_size_t size, const char* dir, ccv_bbf_new_param_t params);
1750
/**
1751
 * Using a BBF classifier cascade to detect objects in a given image. If you have several classifier cascades, it is better to use them in one method call. In this way, ccv will try to optimize the overall performance.
1752
 * @param a The input image.
1753
 * @param cascade An array of classifier cascades.
1754
 * @param count How many classifier cascades you've passed in.
1755
 * @param params A **ccv_bbf_param_t** structure that defines various aspects of the detector.
1756
 * @return A **ccv_array_t** of **ccv_comp_t** for detection results.
1757
 */
1758
CCV_WARN_UNUSED(ccv_array_t*) ccv_bbf_detect_objects(ccv_dense_matrix_t* a, ccv_bbf_classifier_cascade_t** cascade, int count, ccv_bbf_param_t params);
1759
/**
1760
 * Read BBF classifier cascade from working directory.
1761
 * @param directory The working directory that trains a BBF classifier cascade.
1762
 * @return A classifier cascade, 0 if no valid classifier cascade available.
1763
 */
1764
CCV_WARN_UNUSED(ccv_bbf_classifier_cascade_t*) ccv_bbf_read_classifier_cascade(const char* directory);
1765
/**
1766
 * Free up the memory of BBF classifier cascade.
1767
 * @param cascade The BBF classifier cascade.
1768
 */
1769
void ccv_bbf_classifier_cascade_free(ccv_bbf_classifier_cascade_t* cascade);
1770
/**
1771
 * Load BBF classifier cascade from a memory region.
1772
 * @param s The memory region of binarized BBF classifier cascade.
1773
 * @return A classifier cascade, 0 if no valid classifier cascade available.
1774
 */
1775
CCV_WARN_UNUSED(ccv_bbf_classifier_cascade_t*) ccv_bbf_classifier_cascade_read_binary(char* s);
1776
/**
1777
 * Write BBF classifier cascade to a memory region.
1778
 * @param cascade The BBF classifier cascade.
1779
 * @param s The designated memory region.
1780
 * @param slen The size of the designated memory region.
1781
 * @return The actual size of the binarized BBF classifier cascade, if this size is larger than **slen**, please reallocate the memory region and do it again.
1782
 */
1783
int ccv_bbf_classifier_cascade_write_binary(ccv_bbf_classifier_cascade_t* cascade, char* s, int slen);
1784
/** @} */
1785
1786
/* Ferns classifier: this is a fern implementation that specifically used for TLD
1787
 * see: http://cvlab.epfl.ch/alumni/oezuysal/ferns.html for more about ferns */
1788
1789
typedef struct {
1790
  int structs;
1791
  int features;
1792
  int scales;
1793
  int posteriors;
1794
  float threshold;
1795
  int cnum[2];
1796
  int* rnum;
1797
  float* posterior;
1798
  // decided to go flat organized fern so that we can profiling different memory layout impacts the performance
1799
  ccv_point_t fern[1];
1800
} ccv_ferns_t;
1801
1802
CCV_WARN_UNUSED(ccv_ferns_t*) ccv_ferns_new(int structs, int features, int scales, ccv_size_t* sizes);
1803
void ccv_ferns_feature(ccv_ferns_t* ferns, ccv_dense_matrix_t* a, int scale, uint32_t* fern);
1804
void ccv_ferns_correct(ccv_ferns_t* ferns, uint32_t* fern, int c, int repeat);
1805
float ccv_ferns_predict(ccv_ferns_t* ferns, uint32_t* fern);
1806
void ccv_ferns_free(ccv_ferns_t* ferns);
1807
1808
/* TLD: Track-Learn-Detection is a long-term object tracking framework, which achieved very high
1809
 * tracking accuracy, this is the tracking algorithm of choice ccv implements */
1810
/**
1811
 * @defgroup ccv_tld track learn detect
1812
 * @{
1813
 */
1814
1815
typedef struct {
1816
  /**
1817
   * @name Short-term lucas-kanade tracking parameters
1818
   * @{
1819
   */
1820
  ccv_size_t win_size; /**< The window size to compute optical flow. */
1821
  int level; /**< Level of image pyramids */
1822
  float min_eigen; /**< The minimal eigenvalue for a valid optical flow computation */
1823
  float min_forward_backward_error; /**< The minimal forward backward error */
1824
  /** @} */
1825
  /**
1826
   * @name Image pyramid generation parameters (for scale-invariant object detection)
1827
   * @{
1828
   */
1829
  int interval; /**< How many intermediate images in between each image pyramid level (from width => width / 2) */
1830
  float shift; /**< How much steps sliding window should move */
1831
  /** @} */
1832
  /**
1833
   * @name Samples generation parameters
1834
   * @{
1835
   */
1836
  int min_win; /**< The minimal window size of patches for detection */
1837
  float include_overlap; /**< Above this threshold, a bounding box will be positively identified as overlapping with target */
1838
  float exclude_overlap; /**< Below this threshold, a bounding box will be positively identified as not overlapping with target */
1839
  /** @} */
1840
  /**
1841
   * @name Ferns classifier parameters
1842
   * @{
1843
   */
1844
  int structs; /**< How many ferns in the classifier */
1845
  int features; /**< How many features for each fern */
1846
  /** @} */
1847
  /**
1848
   * @name Nearest neighbor classifier parameters
1849
   * @{
1850
   */
1851
  float validate_set; /**< For the conservative confidence score will be only computed on a subset of all positive examples, this value gives how large that subset should be, 0.5 is a reasonable number */
1852
  float nnc_same; /**< Above this threshold, a given patch will be identified as the same */
1853
  float nnc_thres; /**< The initial threshold for positively recognize a patch */
1854
  float nnc_verify; /**< The threshold for a tracking result from short-term tracker be verified as a positive detection */
1855
  float nnc_beyond; /**< The upper bound threshold for adaptive computed threshold */
1856
  float nnc_collect; /**< The threshold that a negative patch above this will be collected as negative example */
1857
  int bad_patches; /**< How many patches should be evaluated in initialization to collect enough negative examples */
1858
  /** @} */
1859
  /**
1860
   * @name Deformation parameters to apply perspective transforms on patches for robustness
1861
   * @{
1862
   */
1863
  int new_deform; /**< Number of deformations should be applied at initialization */
1864
  int track_deform; /**< Number of deformations should be applied at running time */
1865
  float new_deform_angle; /**< The maximal angle for x, y and z axis rotation at initialization */
1866
  float track_deform_angle; /**< The maximal angle for x, y and z axis rotation at running time */
1867
  float new_deform_scale; /**< The maximal scale for the deformation at initialization */
1868
  float track_deform_scale; /**< The maximal scale for the deformation at running time */
1869
  float new_deform_shift; /**< The maximal shift for the deformation at initialization */
1870
  float track_deform_shift; /**< The maximal shift for the deformation at running time */
1871
  /** @} */
1872
  /**
1873
   * @name Speed up parameters
1874
   * @{
1875
   */
1876
  int top_n; /**< Only keep these much positive detections when applying ferns classifier */
1877
  /* speed up technique, instead of running slide window at
1878
   * every frame, we will rotate them, for example, slide window 1
1879
   * only gets examined at frame % rotation == 1 */
1880
  int rotation; /**< When >= 1, using "rotation" technique, which, only evaluate a subset of sliding windows for each frame, but after rotation + 1 frames, every sliding window will be evaluated in one of these frames. */
1881
  /** @} */
1882
} ccv_tld_param_t;
1883
1884
extern const ccv_tld_param_t ccv_tld_default_params;
1885
1886
typedef struct {
1887
  ccv_tld_param_t params;
1888
  ccv_comp_t box; // tracking comp
1889
  ccv_ferns_t* ferns; // ferns classifier
1890
  ccv_array_t* sv[2]; // example-based classifier
1891
  ccv_size_t patch; // resized to patch for example-based classifier
1892
  int found; // if the last time found a valid box
1893
  int verified; // the last frame is verified, therefore, a successful tracking is verified too
1894
  ccv_array_t* top; // top matches
1895
  float ferns_thres; // computed dynamically from negative examples
1896
  float nnc_thres; // computed dynamically from negative examples
1897
  float nnc_verify_thres; // computed dynamically from negative examples
1898
  double var_thres; // computed dynamically from the supplied same
1899
  uint64_t frame_signature;
1900
  int count;
1901
  void* sfmt;
1902
  void* dsfmt;
1903
  uint32_t fern_buffer[1]; // fetched ferns from image, this is a buffer
1904
} ccv_tld_t;
1905
1906
typedef struct {
1907
  int perform_track; /**< Whether we performed tracking or not this time */
1908
  int perform_learn; /**< Whether we performed learning or not this time */
1909
  int track_success; /**< If we have a successful tracking (thus, short term tracker works) */
1910
  int ferns_detects; /**< How many regions passed ferns classifier */
1911
  int nnc_detects; /**< How many regions passed nearest neighbor classifier */
1912
  int clustered_detects; /**< After cluster, how many regions left */
1913
  int confident_matches; /**< How many matches we have outside of the tracking region (may cause a re-initialization of the short term tracking) */
1914
  int close_matches; /**< How many matches we have inside the tracking (may cause a new learning event) */
1915
} ccv_tld_info_t;
1916
1917
/**
1918
 * Create a new TLD tracking instance from a given first frame image and the tracking rectangle.
1919
 * @param a The first frame image.
1920
 * @param box The initial tracking rectangle.
1921
 * @param params A **ccv_tld_param_t** structure that defines various aspects of TLD tracker.
1922
 * @return A **ccv_tld_t** object holds temporal information about tracking.
1923
 */
1924
CCV_WARN_UNUSED(ccv_tld_t*) ccv_tld_new(ccv_dense_matrix_t* a, ccv_rect_t box, ccv_tld_param_t params);
1925
/** 
1926
 * ccv doesn't have retain / release semantics. Thus, a TLD instance cannot retain the most recent frame it tracks for future reference, you have to pass that in by yourself.
1927
 * @param tld The TLD instance for continuous tracking
1928
 * @param a The last frame used for tracking (ccv_tld_track_object will check signature of this against the last frame TLD instance tracked)
1929
 * @param b The new frame will be tracked
1930
 * @param info A **ccv_tld_info_t** structure that will records several aspects of current tracking
1931
 * @return The newly predicted bounding box for the tracking object.
1932
 */
1933
ccv_comp_t ccv_tld_track_object(ccv_tld_t* tld, ccv_dense_matrix_t* a, ccv_dense_matrix_t* b, ccv_tld_info_t* info);
1934
/**
1935
 * @param tld The TLD instance to be freed.
1936
 */
1937
void ccv_tld_free(ccv_tld_t* tld);
1938
/** @} */
1939
1940
/* ICF: Integral Channels Features, this is a theorized framework that retrospectively incorporates the original
1941
 * Viola-Jones detection method with various enhancement later. Specifically, this implementation is after:
1942
 * Pedestrian detection at 100 frames per second, Rodrigo Benenson, Markus Mathias, Radu Timofte and Luc Van Gool
1943
 * With WFS (width first search) tree from:
1944
 * High-Performance Rotation Invariant Multiview Face Detection, Chang Huang, Haizhou Ai, Yuan Li and Shihong Lao */
1945
1946
/**
1947
 * @defgroup ccv_icf integral channel features
1948
 * @{
1949
 */
1950
1951
#define CCV_ICF_SAT_MAX (2)
1952
1953
typedef struct {
1954
  int count;
1955
  int channel[CCV_ICF_SAT_MAX];
1956
  ccv_point_t sat[CCV_ICF_SAT_MAX * 2];
1957
  float alpha[CCV_ICF_SAT_MAX];
1958
  float beta;
1959
} ccv_icf_feature_t;
1960
1961
typedef struct {
1962
  // we use depth-2 decision tree
1963
  uint32_t pass;
1964
  ccv_icf_feature_t features[3];
1965
  float weigh[2];
1966
  float threshold;
1967
} ccv_icf_decision_tree_t;
1968
1969
enum {
1970
  CCV_ICF_CLASSIFIER_TYPE_A = 0x1,
1971
  CCV_ICF_CLASSIFIER_TYPE_B = 0x2,
1972
};
1973
1974
typedef struct {
1975
  int type;
1976
  int count;
1977
  int grayscale;
1978
  ccv_margin_t margin;
1979
  ccv_size_t size; // this is the size includes the margin
1980
  ccv_icf_decision_tree_t* weak_classifiers;
1981
} ccv_icf_classifier_cascade_t; // Type A, scale image
1982
1983
typedef struct {
1984
  int type;
1985
  int count;
1986
  int octave;
1987
  int grayscale;
1988
  ccv_icf_classifier_cascade_t* cascade;
1989
} ccv_icf_multiscale_classifier_cascade_t; // Type B, scale the classifier
1990
1991
typedef struct {
1992
  int min_neighbors; /**< 0: no grouping afterwards. 1: group objects that intersects each other. > 1: group objects that intersects each other, and only passes these that have at least **min_neighbors** intersected objects. */
1993
  int flags;
1994
  int step_through; /**< The step size for detection. */
1995
  int interval; /**< Interval images between the full size image and the half size one. e.g. 2 will generate 2 images in between full size image and half size one: image with full size, image with 5/6 size, image with 2/3 size, image with 1/2 size. */
1996
  float threshold;
1997
} ccv_icf_param_t;
1998
1999
extern const ccv_icf_param_t ccv_icf_default_params;
2000
2001
typedef struct {
2002
  ccv_icf_param_t detector; /**< A **ccv_icf_param_t** structure that defines various aspects of the detector. */
2003
  int grayscale; /**< Whether to exploit color in a given image. */
2004
  int min_dimension; /**< The minimal size of a ICF feature region. */
2005
  ccv_margin_t margin;
2006
  ccv_size_t size; /**< A **ccv_size_t** structure that defines the width and height of the classifier. */
2007
  int feature_size; /**< The number of ICF features to pool from. */
2008
  int weak_classifier; /**< The number of weak classifiers that will be used to construct the strong classifier. */
2009
  int bootstrap; /**< The number of boostrap to collect negatives. */
2010
  float deform_angle; /**< The range of rotations to add distortion, in radius. */
2011
  float deform_scale; /**< The range of scale changes to add distortion. */
2012
  float deform_shift; /**< The range of translations to add distortion, in pixel. */
2013
  double acceptance; /**< The percentage of validation examples will be accepted when soft cascading the classifiers that will be sued for bootstrap. */
2014
} ccv_icf_new_param_t;
2015
2016
void ccv_icf(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type);
2017
2018
/* ICF for single scale */
2019
/**
2020
 * Create a new ICF classifier cascade from given positive examples and background images. This function has a hard dependency on [GSL](http://www.gnu.org/software/gsl/) and better be used with [libdispatch](http://libdispatch.macosforge.org/) for maximum efficiency.
2021
 * @param posfiles An array of **ccv_file_info_t** that gives the positive examples and their locations.
2022
 * @param posnum The number of positive examples that we want to use (with certain random distortions if so choose).
2023
 * @param bgfiles An array of **ccv_file_info_t** that gives the background images.
2024
 * @param negnum The number of negative examples will be collected during bootstrapping / initialization.
2025
 * @param testfiles An array of **ccv_file_info_t** that gives the validation examples and their locations.
2026
 * @param dir The directory that saves the progress.
2027
 * @param params A **ccv_icf_new_param_t** structure that defines various aspects of the training function.
2028
 * @return A trained classifier cascade.
2029
 */
2030
CCV_WARN_UNUSED(ccv_icf_classifier_cascade_t*) ccv_icf_classifier_cascade_new(ccv_array_t* posfiles, int posnum, ccv_array_t* bgfiles, int negnum, ccv_array_t* testfiles, const char* dir, ccv_icf_new_param_t params);
2031
/**
2032
 * Compute soft cascade thresholds to speed up the classifier cascade performance.
2033
 * @param cascade The trained classifier that we want to optimize soft cascade thresholds on.
2034
 * @param posfiles An array of **ccv_array_t** that gives the positive examples and their locations.
2035
 * @param acceptance The percentage of positive examples will be accepted when optimizing the soft cascade thresholds.
2036
 */
2037
void ccv_icf_classifier_cascade_soft(ccv_icf_classifier_cascade_t* cascade, ccv_array_t* posfiles, double acceptance);
2038
/**
2039
 * Read a ICF classifier from a file.
2040
 * @param filename The file path that contains the trained ICF classifier.
2041
 * @return The classifier cascade, 0 if no valid classifier cascade available.
2042
 */
2043
CCV_WARN_UNUSED(ccv_icf_classifier_cascade_t*) ccv_icf_read_classifier_cascade(const char* filename);
2044
/**
2045
 * Write a ICF classifier to a file.
2046
 * @param classifier The classifier that we want to write to file.
2047
 * @param filename The file path that we want to persist the ICF classifier.
2048
 */
2049
void ccv_icf_write_classifier_cascade(ccv_icf_classifier_cascade_t* classifier, const char* filename);
2050
/**
2051
 * Free up the memory of ICF classifier cascade.
2052
 * @param classifier The ICF classifier cascade.
2053
 */
2054
void ccv_icf_classifier_cascade_free(ccv_icf_classifier_cascade_t* classifier);
2055
2056
/* ICF for multiple scale */
2057
CCV_WARN_UNUSED(ccv_icf_multiscale_classifier_cascade_t*) ccv_icf_multiscale_classifier_cascade_new(ccv_icf_classifier_cascade_t* cascades, int octave, int interval);
2058
CCV_WARN_UNUSED(ccv_icf_multiscale_classifier_cascade_t*) ccv_icf_read_multiscale_classifier_cascade(const char* directory);
2059
void ccv_icf_write_multiscale_classifier_cascade(ccv_icf_multiscale_classifier_cascade_t* classifier, const char* directory);
2060
void ccv_icf_multiscale_classifier_cascade_free(ccv_icf_multiscale_classifier_cascade_t* classifier);
2061
2062
/* polymorph function to run ICF based detector */
2063
/**
2064
 * Using a ICF classifier cascade to detect objects in a given image. If you have several classifier cascades, it is better to use them in one method call. In this way, ccv will try to optimize the overall performance.
2065
 * @param a The input image.
2066
 * @param cascade An array of classifier cascades.
2067
 * @param count How many classifier cascades you've passed in.
2068
 * @param params A **ccv_icf_param_t** structure that defines various aspects of the detector.
2069
 * @return A **ccv_array_t** of **ccv_comp_t** with detection results.
2070
 */
2071
CCV_WARN_UNUSED(ccv_array_t*) ccv_icf_detect_objects(ccv_dense_matrix_t* a, void* cascade, int count, ccv_icf_param_t params);
2072
/** @} */
2073
2074
/* SCD: SURF-Cascade Detector
2075
 * This is a variant of VJ framework for object detection
2076
 * Read: Learning SURF Cascade for Fast and Accurate Object Detection
2077
 */
2078
/**
2079
 * @defgroup ccv_scd surf-cascade detection
2080
 * @{
2081
 */
2082
2083
typedef struct {
2084
  int sx[4];
2085
  int sy[4];
2086
  int dx[4];
2087
  int dy[4];
2088
  float bias;
2089
  float w[32];
2090
} ccv_scd_stump_feature_t;
2091
2092
typedef struct {
2093
  int count;
2094
  ccv_scd_stump_feature_t* features;
2095
  float threshold;
2096
} ccv_scd_stump_classifier_t;
2097
2098
// this is simpler than ccv's icf feature, largely inspired
2099
// by the latest implementation of doppia, it seems more restrictive
2100
// approach can generate more robust feature due to the overfitting
2101
// nature of decision tree
2102
typedef struct {
2103
  int channel;
2104
  int sx;
2105
  int sy;
2106
  int dx;
2107
  int dy;
2108
  float bias;
2109
} ccv_scd_tree_feature_t;
2110
2111
enum {
2112
  CCV_SCD_STUMP_FEATURE = 0x01,
2113
  CCV_SCD_TREE_FEATURE = 0x02,
2114
};
2115
2116
typedef struct {
2117
  int type;
2118
  uint32_t pass;
2119
  ccv_scd_stump_feature_t feature;
2120
  ccv_scd_tree_feature_t node[3];
2121
  float beta[6];
2122
  float threshold;
2123
} ccv_scd_decision_tree_t;
2124
2125
typedef struct {
2126
  int count;
2127
  ccv_margin_t margin;
2128
  ccv_size_t size;
2129
  ccv_scd_stump_classifier_t* classifiers;
2130
  // the last stage classifier is a hybrid of scd feature with icf-like feature
2131
  // this is trained as soft-cascade classifier, and select between a depth-2 decision tree
2132
  // or the scd feature.
2133
  struct {
2134
    int count;
2135
    ccv_scd_decision_tree_t* tree;
2136
  } decision;
2137
} ccv_scd_classifier_cascade_t;
2138
2139
typedef struct {
2140
  int min_neighbors; /**< 0: no grouping afterwards. 1: group objects that intersects each other. > 1: group objects that intersects each other, and only passes these that have at least **min_neighbors** intersected objects. */
2141
  int step_through; /**< The step size for detection. */
2142
  int interval; /**< Interval images between the full size image and the half size one. e.g. 2 will generate 2 images in between full size image and half size one: image with full size, image with 5/6 size, image with 2/3 size, image with 1/2 size. */
2143
  ccv_size_t size; /**< The smallest object size that will be interesting to us. */
2144
} ccv_scd_param_t;
2145
2146
typedef struct {
2147
  int boosting; /**< How many stages of boosting should be performed. */
2148
  ccv_size_t size; /**< What's the window size of the final classifier. */
2149
  struct {
2150
    ccv_size_t base; /**< [feature.base] A **ccv_size_t** structure defines the minimal feature dimensions. */
2151
    int range_through; /**< [feature.range_through] The step size to increase feature dimensions. */
2152
    int step_through; /**< [feature.step_through] The step size to move to cover the whole window size. */
2153
  } feature;
2154
  struct {
2155
    float hit_rate; /**< [stop_criteria.hit_rate] The targeted hit rate for each stage of classifier. */
2156
    float false_positive_rate; /**< [stop_criteria.false_positive_rate] The targeted false positive rate for each stage of classifier. */
2157
    float accu_false_positive_rate; /**< [stop_criteria.accu_false_positive_rate] The targeted accumulative false positive rate for classifier cascade, the training will be terminated once the accumulative false positive rate target reached. */
2158
    float auc_crit; /**< [stop_criteria.auc_crit] The epsilon to decide if auc (area under curve) can no longer be improved. Once auc can no longer be improved and the targeted false positive rate reached, this stage of training will be terminated and start the next stage training. */
2159
    int maximum_feature; /**< [stop_criteria.maximum_feature] Maximum number of features one stage can have. */
2160
    int prune_stage; /**< [stop_criteria.prune_stage] How many stages will act as "prune" stage, which means will take minimal effort to prune as much negative areas as possible. */
2161
    int prune_feature; /**< [stop_criteria.prune_feature] How many features a prune stage should have, it should be a very small number to enable efficient pruning. */
2162
  } stop_criteria;
2163
  double weight_trimming; /**< Only consider examples with weights in this percentile for training, this avoid to consider examples with tiny weights. */
2164
  double C; /**< The C parameter to train the weak linear SVM classifier. */
2165
  int grayscale; /**< To train the classifier with grayscale image. */
2166
} ccv_scd_train_param_t;
2167
2168
extern const ccv_scd_param_t ccv_scd_default_params;
2169
2170
/**
2171
 * Create a new SCD classifier cascade from given positive examples and background images. This function has a hard dependency on [GSL](http://www.gnu.org/software/gsl/).
2172
 * @param posfiles An array of **ccv_file_info_t** that gives the positive examples.
2173
 * @param hard_mine An array of **ccv_file_info_t** that gives images don't contain any positive examples (for example, to train a face detector, these are images that doesn't contain any faces).
2174
 * @param negative_count Number of negative examples that is harvested from background images.
2175
 * @param filename The file that saves both progress and final classifier, this will be in sqlite3 database format.
2176
 * @param params A **ccv_scd_train_param_t** that defines various aspects of the training function.
2177
 * @return The trained SCD classifier cascade.
2178
 */
2179
CCV_WARN_UNUSED(ccv_scd_classifier_cascade_t*) ccv_scd_classifier_cascade_new(ccv_array_t* posfiles, ccv_array_t* hard_mine, int negative_count, const char* filename, ccv_scd_train_param_t params);
2180
/**
2181
 * Write SCD classifier cascade to a file.
2182
 * @param cascade The BBF classifier cascade.
2183
 * @param filename The file that will be written to, it is in sqlite3 database format.
2184
 */
2185
void ccv_scd_classifier_cascade_write(ccv_scd_classifier_cascade_t* cascade, const char* filename);
2186
/**
2187
 * Read SCD classifier cascade from file.
2188
 * @param filename The file that contains a SCD classifier cascade, it is in sqlite3 database format.
2189
 * @return A classifier cascade, 0 returned if no valid classifier cascade available.
2190
 */
2191
CCV_WARN_UNUSED(ccv_scd_classifier_cascade_t*) ccv_scd_classifier_cascade_read(const char* filename);
2192
/**
2193
 * Free up the memory of SCD classifier cascade.
2194
 * @param cascade The SCD classifier cascade.
2195
 */
2196
void ccv_scd_classifier_cascade_free(ccv_scd_classifier_cascade_t* cascade);
2197
2198
/**
2199
 * Generate 8-channel output matrix which extract SURF features (dx, dy, |dx|, |dy|, du, dv, |du|, |dv|) for input. If input is multi-channel matrix (such as RGB), will pick the strongest responses among these channels.
2200
 * @param a The input matrix.
2201
 * @param b The output matrix.
2202
 * @param type The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
2203
 */
2204
void ccv_scd(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type);
2205
/**
2206
 * Using a SCD classifier cascade to detect objects in a given image. If you have several classifier cascades, it is better to use them in one method call. In this way, ccv will try to optimize the overall performance.
2207
 * @param a The input image.
2208
 * @param cascades An array of classifier cascades.
2209
 * @param count How many classifier cascades you've passed in.
2210
 * @param params A **ccv_scd_param_t** structure that defines various aspects of the detector.
2211
 * @return A **ccv_array_t** of **ccv_comp_t** with detection results.
2212
 */
2213
CCV_WARN_UNUSED(ccv_array_t*) ccv_scd_detect_objects(ccv_dense_matrix_t* a, ccv_scd_classifier_cascade_t** cascades, int count, ccv_scd_param_t params);
2214
/** @} */
2215
2216
/* categorization types and methods for training */
2217
2218
enum {
2219
  CCV_CATEGORIZED_DENSE_MATRIX = 0x01,
2220
  CCV_CATEGORIZED_FILE = 0x02,
2221
};
2222
2223
typedef struct {
2224
  int c; // class / category label
2225
  int type;
2226
  union {
2227
    ccv_dense_matrix_t* matrix;
2228
    ccv_file_info_t file;
2229
  };
2230
} ccv_categorized_t;
2231
2232
inline static ccv_categorized_t ccv_categorized(int c, ccv_dense_matrix_t* matrix, ccv_file_info_t* file)
2233
180k
{
2234
180k
  assert((matrix && !file) || (!matrix && file));
2235
180k
  ccv_categorized_t categorized;
2236
180k
  categorized.c = c;
2237
180k
  if (matrix)
2238
180k
    categorized.type = CCV_CATEGORIZED_DENSE_MATRIX, categorized.matrix = matrix;
2239
0
  else
2240
0
    categorized.type = CCV_CATEGORIZED_FILE, categorized.file = *file;
2241
180k
  return categorized;
2242
180k
}
Unexecuted instantiation: util.tests.c:ccv_categorized
Unexecuted instantiation: basic.tests.c:ccv_categorized
Unexecuted instantiation: memory.tests.c:ccv_categorized
Unexecuted instantiation: transform.tests.c:ccv_categorized
Unexecuted instantiation: image_processing.tests.c:ccv_categorized
Unexecuted instantiation: 3rdparty.tests.c:ccv_categorized
Unexecuted instantiation: algebra.tests.c:ccv_categorized
Unexecuted instantiation: io.tests.c:ccv_categorized
Unexecuted instantiation: gradient.tests.c:ccv_categorized
Unexecuted instantiation: upsample.tests.c:ccv_categorized
Unexecuted instantiation: concat.tests.c:ccv_categorized
Unexecuted instantiation: tensor.bind.tests.c:ccv_categorized
Unexecuted instantiation: backward.tests.c:ccv_categorized
Unexecuted instantiation: graph.tests.c:ccv_categorized
Unexecuted instantiation: case_of.backward.tests.c:ccv_categorized
Unexecuted instantiation: while.backward.tests.c:ccv_categorized
Unexecuted instantiation: autograd.vector.tests.c:ccv_categorized
Unexecuted instantiation: dropout.tests.c:ccv_categorized
Unexecuted instantiation: custom.tests.c:ccv_categorized
Unexecuted instantiation: reduce.tests.c:ccv_categorized
Unexecuted instantiation: tfb.tests.c:ccv_categorized
Unexecuted instantiation: batch.norm.tests.c:ccv_categorized
Unexecuted instantiation: crossentropy.tests.c:ccv_categorized
Unexecuted instantiation: cnnp.core.tests.c:ccv_categorized
Unexecuted instantiation: symbolic.graph.tests.c:ccv_categorized
Unexecuted instantiation: case_of.tests.c:ccv_categorized
Unexecuted instantiation: micro.tests.c:ccv_categorized
Unexecuted instantiation: compression.tests.c:ccv_categorized
Unexecuted instantiation: dataframe.tests.c:ccv_categorized
Unexecuted instantiation: gemm.tests.c:ccv_categorized
Unexecuted instantiation: roi_align.tests.c:ccv_categorized
Unexecuted instantiation: swish.tests.c:ccv_categorized
Unexecuted instantiation: index.tests.c:ccv_categorized
Unexecuted instantiation: minimize.tests.c:ccv_categorized
Unexecuted instantiation: symbolic.graph.compile.tests.c:ccv_categorized
Unexecuted instantiation: autograd.tests.c:ccv_categorized
Unexecuted instantiation: tensor.tests.c:ccv_categorized
Unexecuted instantiation: rand.tests.c:ccv_categorized
Unexecuted instantiation: while.tests.c:ccv_categorized
Unexecuted instantiation: nms.tests.c:ccv_categorized
Unexecuted instantiation: graph.io.tests.c:ccv_categorized
Unexecuted instantiation: cblas.tests.c:ccv_categorized
Unexecuted instantiation: simplify.tests.c:ccv_categorized
Unexecuted instantiation: numa.tests.c:ccv_categorized
Unexecuted instantiation: tape.tests.c:ccv_categorized
Unexecuted instantiation: dynamic.graph.tests.c:ccv_categorized
Unexecuted instantiation: layer.norm.tests.c:ccv_categorized
Unexecuted instantiation: parallel.tests.c:ccv_categorized
Unexecuted instantiation: winograd.tests.c:ccv_categorized
Unexecuted instantiation: dataframe.addons.tests.c:ccv_categorized
Unexecuted instantiation: broadcast.tests.c:ccv_categorized
Unexecuted instantiation: compare.tests.c:ccv_categorized
Unexecuted instantiation: smooth_l1.tests.c:ccv_categorized
Unexecuted instantiation: forward.tests.c:ccv_categorized
Unexecuted instantiation: output.tests.c:ccv_categorized
Unexecuted instantiation: convnet.tests.c:ccv_categorized
Unexecuted instantiation: numeric.tests.c:ccv_categorized
Unexecuted instantiation: defects.l0.1.tests.c:ccv_categorized
Unexecuted instantiation: cublas.tests.c:ccv_categorized
Unexecuted instantiation: symbolic.graph.vgg.d.tests.c:ccv_categorized
Unexecuted instantiation: imdb.tests.c:ccv_categorized
Unexecuted instantiation: graph.vgg.d.tests.c:ccv_categorized
Unexecuted instantiation: random.tests.c:ccv_categorized
Unexecuted instantiation: cudnn.tests.c:ccv_categorized
Unexecuted instantiation: dense.net.tests.c:ccv_categorized
cifar.tests.c:ccv_categorized
Line
Count
Source
2233
180k
{
2234
180k
  assert((matrix && !file) || (!matrix && file));
2235
180k
  ccv_categorized_t categorized;
2236
180k
  categorized.c = c;
2237
180k
  if (matrix)
2238
180k
    categorized.type = CCV_CATEGORIZED_DENSE_MATRIX, categorized.matrix = matrix;
2239
0
  else
2240
0
    categorized.type = CCV_CATEGORIZED_FILE, categorized.file = *file;
2241
180k
  return categorized;
2242
180k
}
Unexecuted instantiation: rmsprop.tests.c:ccv_categorized
Unexecuted instantiation: sgd.tests.c:ccv_categorized
Unexecuted instantiation: nccl.tests.c:ccv_categorized
Unexecuted instantiation: schedule.tests.c:ccv_categorized
Unexecuted instantiation: loss.tests.c:ccv_categorized
Unexecuted instantiation: adam.tests.c:ccv_categorized
Unexecuted instantiation: ccv_cache.c:ccv_categorized
Unexecuted instantiation: ccv_memory.c:ccv_categorized
Unexecuted instantiation: ccv_io.c:ccv_categorized
Unexecuted instantiation: ccv_numeric.c:ccv_categorized
Unexecuted instantiation: ccv_algebra.c:ccv_categorized
Unexecuted instantiation: ccv_util.c:ccv_categorized
Unexecuted instantiation: ccv_basic.c:ccv_categorized
Unexecuted instantiation: ccv_image_processing.c:ccv_categorized
Unexecuted instantiation: ccv_resample.c:ccv_categorized
Unexecuted instantiation: ccv_transform.c:ccv_categorized
Unexecuted instantiation: ccv_classic.c:ccv_categorized
Unexecuted instantiation: ccv_convnet.c:ccv_categorized
Unexecuted instantiation: ccv_output.c:ccv_categorized
Unexecuted instantiation: cwc_convnet_ext.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_cmd.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_tensor.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_tensor_io.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_stream.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_micro.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_micro_core.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_micro_interpret.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_micro_simplify.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_graph.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_io.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_compile.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_backward.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_while.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_graph_while.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_tensor_tape.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_case_of.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_graph_case_of.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_minimize.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_parallel.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_simplify.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_symbolic_graph_memory_compression.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_graph_run.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dynamic_graph.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dynamic_graph_alloc.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dynamic_graph_backward.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dynamic_graph_apply_gradients.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dynamic_graph_minimize.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dynamic_graph_evaluate.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_dataframe.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_dataframe_core.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_dataframe_addons.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_dataframe_csv.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_model.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_model_io.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_model_core.c:ccv_categorized
Unexecuted instantiation: ccv_cnnp_model_addons.c:ccv_categorized
Unexecuted instantiation: co.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_rand_uniform_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_rand_normal_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_conv_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_conv_cpu_opt.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_swish_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dropout_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_softmax_crossentropy_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_sgd_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_max_pool_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_avg_pool_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_lssc_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_min_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_max_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_softmax_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_binary_crossentropy_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_categorical_crossentropy_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_smooth_l1_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_relu_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_adam_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_nms_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_gemm_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_gemm_cpu_opt.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_add_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_mul_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_upsample_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_util_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_roi_align_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_sigmoid_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_index_select_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_rmsprop_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_ew_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_reduce_sum_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_reduce_max_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_batch_norm_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_layer_norm_cpu_ref.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_rand.c:ccv_categorized
Unexecuted instantiation: _ccv_nnc_conv_cpu_4x4_3x3_winograd.c:ccv_categorized
Unexecuted instantiation: _ccv_nnc_conv_cpu_fft.c:ccv_categorized
Unexecuted instantiation: _ccv_nnc_conv_cpu_gemm.c:ccv_categorized
Unexecuted instantiation: _ccv_nnc_conv_cpu_opt.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_convolution.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_swish.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_dropout.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_softmax_crossentropy.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_sgd.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_pool.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_sigmoid_binary_crossentropy.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_compression.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_cmp.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_softmax.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_binary_crossentropy.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_categorical_crossentropy.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_smooth_l1.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_relu.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_adam.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_nms.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_blas.c:ccv_categorized
Unexecuted instantiation: _ccv_nnc_gemm_cpu_opt.c:ccv_categorized
Unexecuted instantiation: _ccv_nnc_gemm_cpu_sys.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_upsample.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_comm.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_util.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_roi_align.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_sigmoid.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_index_select.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_rmsprop.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_ew.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_reduce.c:ccv_categorized
Unexecuted instantiation: ccv_nnc_norm.c:ccv_categorized
2243
2244
/**
2245
 * @defgroup ccv_convnet deep convolutional networks
2246
 * This is a implementation of deep convolutional networks mainly for image recognition and object detection.
2247
 * @{
2248
 */
2249
2250
enum {
2251
  CCV_CONVNET_CONVOLUTIONAL = 0x01,
2252
  CCV_CONVNET_FULL_CONNECT = 0x02,
2253
  CCV_CONVNET_MAX_POOL = 0x03,
2254
  CCV_CONVNET_AVERAGE_POOL = 0x04,
2255
  CCV_CONVNET_LOCAL_RESPONSE_NORM = 0x05,
2256
};
2257
2258
typedef union {
2259
  struct {
2260
    int count; /**< [convolutional.count] The number of filters for convolutional layer. */
2261
    int strides; /**< [convolutional.strides] The strides for convolutional filter. */
2262
    int border; /**< [convolutional.border] The padding border size for the input matrix. */
2263
    int rows; /**< [convolutional.rows] The number of rows for convolutional filter. */
2264
    int cols; /**< [convolutional.cols] The number of columns for convolutional filter. */
2265
    int channels; /**< [convolutional.channels] The number of channels for convolutional filter. */
2266
    int partition; /**< [convolutional.partition] The number of partitions for convolutional filter. */
2267
  } convolutional;
2268
  struct {
2269
    int strides; /**< [pool.strides] The strides for pooling layer. */
2270
    int size; /**< [pool.size] The window size for pooling layer. */
2271
    int border; /**< [pool.border] The padding border size for the input matrix. */
2272
  } pool;
2273
  struct {
2274
    int size; /**< [rnorm.size] The size of local response normalization layer. */
2275
    float kappa; /**< [rnorm.kappa] As of b[i] = a[i] / (rnorm.kappa + rnorm.alpha * sum(a, i - rnorm.size / 2, i + rnorm.size / 2)) ^ rnorm.beta */
2276
    float alpha; /**< [rnorm.alpha] See **rnorm.kappa**. */
2277
    float beta; /**< [rnorm.beta] See **rnorm.kappa**. */
2278
  } rnorm;
2279
  struct {
2280
    int relu; /**< [full_connect.relu] 0 - ReLU, 1 - no ReLU */
2281
    int count; /**< [full_connect.count] The number of output nodes for full connect layer. */
2282
  } full_connect;
2283
} ccv_convnet_type_t;
2284
2285
typedef struct {
2286
  struct {
2287
    int rows; /**< [matrix.rows] The number of rows of the input matrix. */
2288
    int cols; /**< [matrix.cols] The number of columns of the input matrix. */
2289
    int channels; /**< [matrix.channels] The number of channels of the input matrix. */
2290
    int partition; /**< [matrix.partition] The number of partitions of the input matrix, it must be dividable by the number of channels (it is partitioned by channels). */
2291
  } matrix;
2292
  struct {
2293
    int count; /**< [node.count] The number of nodes. You should either use **node** or **matrix** to specify the input structure. */
2294
  } node;
2295
} ccv_convnet_input_t;
2296
2297
typedef struct {
2298
  int type; /**< One of following value to specify the network layer type, **CCV_CONVNET_CONVOLUTIONAL**, **CCV_CONVNET_FULL_CONNECT**, **CCV_CONVNET_MAX_POOL**, **CCV_CONVNET_AVERAGE_POOL**, **CCV_CONVNET_LOCAL_RESPONSE_NORM**. */
2299
  float bias; /**< The initialization value for bias if applicable (for convolutional layer and full connect layer). */
2300
  float glorot; /**< The truncated uniform distribution coefficients for weights if applicable (for convolutional layer and full connect layer, glorot / sqrt(in + out)). */
2301
  ccv_convnet_input_t input; /**< A **ccv_convnet_input_t** specifies the input structure. */
2302
  ccv_convnet_type_t output; /**< A **ccv_convnet_type_t** specifies the output parameters and structure. */
2303
} ccv_convnet_layer_param_t;
2304
2305
typedef struct {
2306
  int type;
2307
  float* w; // weight
2308
  float* bias; // bias
2309
  size_t wnum; // the number of weights
2310
  ccv_convnet_input_t input; // the input requirement
2311
  ccv_convnet_type_t net; // network configuration
2312
  void* reserved;
2313
} ccv_convnet_layer_t;
2314
2315
typedef struct {
2316
  int use_cwc_accel; // use "ccv with cuda" acceleration
2317
  // this is redundant, but good to enforcing what the input should look like
2318
  ccv_size_t input;
2319
  int rows;
2320
  int cols;
2321
  int channels;
2322
  // count and layer of the convnet
2323
  int count;
2324
  ccv_dense_matrix_t* mean_activity; // mean activity to subtract from
2325
  ccv_convnet_layer_t* layers; // the layer configuration
2326
  // these can be reused and we don't need to reallocate memory
2327
  ccv_dense_matrix_t** denoms; // denominators
2328
  ccv_dense_matrix_t** acts; // hidden layers and output layers
2329
  void* reserved;
2330
} ccv_convnet_t;
2331
2332
typedef struct {
2333
  float decay; /**< See **learn_rate**. */
2334
  float learn_rate; /**< New velocity = **momentum** * old velocity - **decay** * **learn_rate** * old value + **learn_rate** * delta, new value = old value + new velocity */
2335
  float momentum; /**< See **learn_rate**. */
2336
} ccv_convnet_layer_sgd_param_t;
2337
2338
typedef struct {
2339
  // the dropout rate, I find that dor is better looking than dropout_rate,
2340
  // and drop out is happened on the input neuron (so that when the network
2341
  // is used in real-world, I simply need to multiply its weights to 1 - dor
2342
  // to get the real one)
2343
  float dor; /**< The dropout rate for this layer, it is only applicable for full connect layer. */
2344
  ccv_convnet_layer_sgd_param_t w; /**< A **ccv_convnet_layer_sgd_param_t** specifies the stochastic gradient descent update rule for weight, it is only applicable for full connect layer and convolutional layer. */
2345
  ccv_convnet_layer_sgd_param_t bias; /**< A **ccv_convnet_layer_sgd_param_t** specifies the stochastic gradient descent update rule for bias, it is only applicable for full connect layer and convolutional layer weight. */
2346
} ccv_convnet_layer_train_param_t;
2347
2348
typedef struct {
2349
  int max_epoch; /**< The number of epoch (an epoch sweeps through all the examples) to go through before end the training. */
2350
  int mini_batch; /**< The number of examples for a batch in stochastic gradient descent. */
2351
  int iterations; /**< The number of iterations (an iteration is for one batch) before save the progress. */
2352
  int sgd_frequency; /**< After how many batches when we do a SGD update. */
2353
  int symmetric; /**< Whether to exploit the symmetric property of the provided examples. */
2354
  int device_count; /**< Use how many GPU devices, this is capped by available CUDA devices on your system. For now, ccv's implementation only support up to 4 GPUs */
2355
  int peer_access; /**< Enable peer access for cross device communications or not, this will enable faster multiple device training. */
2356
  float image_manipulation; /**< The value for image brightness / contrast / saturation manipulations. */
2357
  float color_gain; /**< The color variance for data augmentation (0 means no such augmentation). */
2358
  struct {
2359
    int min_dim; /**< [input.min_dim] The minimum dimensions for random resize of training images. */
2360
    int max_dim; /**< [input.max_dim] The maximum dimensions for random resize of training images. */
2361
  } input;
2362
  ccv_convnet_layer_train_param_t* layer_params; /**< An C-array of **ccv_convnet_layer_train_param_t** training parameters for each layer. */
2363
} ccv_convnet_train_param_t;
2364
2365
typedef struct {
2366
  int half_precision; /**< Use half precision float point to represent network parameters. */
2367
} ccv_convnet_write_param_t;
2368
2369
/**
2370
 * Create a new (deep) convolutional network with specified parameters. ccv only supports convolutional layer (shared weights), max pooling layer, average pooling layer, full connect layer and local response normalization layer.
2371
 * @param use_cwc_accel Whether use CUDA-enabled GPU to accelerate various computations for convolutional network.
2372
 * @param input Ihe input size of the image, it is not necessarily the input size of the first convolutional layer.
2373
 * @param params[] The C-array of **ccv_convnet_layer_param_t** that specifies the parameters for each layer.
2374
 * @param count The size of params[] C-array.
2375
 * @return A new deep convolutional network structs
2376
 */
2377
CCV_WARN_UNUSED(ccv_convnet_t*) ccv_convnet_new(int use_cwc_accel, ccv_size_t input, ccv_convnet_layer_param_t params[], int count);
2378
/**
2379
 * Verify the specified parameters make sense as a deep convolutional network.
2380
 * @param convnet A deep convolutional network to verify.
2381
 * @param output The output number of nodes (for the last full connect layer).
2382
 * @return 0 if the given deep convolutional network making sense.
2383
 */
2384
int ccv_convnet_verify(ccv_convnet_t* convnet, int output);
2385
/**
2386
 * Start to train a deep convolutional network with given parameters and data.
2387
 * @param convnet A deep convolutional network that is initialized.
2388
 * @param categorizeds An array of images with its category information for training.
2389
 * @param tests An array of images with its category information for validating.
2390
 * @param filename The working file to save progress and the trained convolutional network.
2391
 * @param params A ccv_convnet_train_param_t that specifies the training parameters.
2392
 */
2393
void ccv_convnet_supervised_train(ccv_convnet_t* convnet, ccv_array_t* categorizeds, ccv_array_t* tests, const char* filename, ccv_convnet_train_param_t params);
2394
/**
2395
 * Use a convolutional network to encode an image into a compact representation.
2396
 * @param convnet The given convolutional network.
2397
 * @param a A C-array of input images.
2398
 * @param b A C-array of output matrix of compact representation.
2399
 * @param batch The number of input images.
2400
 */
2401
void ccv_convnet_encode(ccv_convnet_t* convnet, ccv_dense_matrix_t** a, ccv_dense_matrix_t** b, int batch);
2402
void ccv_convnet_input_formation(ccv_size_t input, ccv_dense_matrix_t* a, ccv_dense_matrix_t** b);
2403
/**
2404
 * Use a convolutional network to classify an image into categories.
2405
 * @param convnet The given convolutional network.
2406
 * @param a A C-array of input images.
2407
 * @param symmetric Whether the input is symmetric.
2408
 * @param ranks A C-array of **ccv_array_t** contains top categories by the convolutional network.
2409
 * @param tops The number of top categories return for each image.
2410
 * @param batch The number of input images.
2411
 */
2412
void ccv_convnet_classify(ccv_convnet_t* convnet, ccv_dense_matrix_t** a, int symmetric, ccv_array_t** ranks, int tops, int batch);
2413
/**
2414
 * Read a convolutional network that persisted on the disk.
2415
 * @param use_cwc_accel Use CUDA-enabled GPU acceleration.
2416
 * @param filename The file on the disk.
2417
 */
2418
CCV_WARN_UNUSED(ccv_convnet_t*) ccv_convnet_read(int use_cwc_accel, const char* filename);
2419
/**
2420
 * Write a convolutional network to a disk.
2421
 * @param convnet A given convolutional network.
2422
 * @param filename The file on the disk.
2423
 * @param params A **ccv_convnet_write_param_t** to specify the write parameters.
2424
 */
2425
void ccv_convnet_write(ccv_convnet_t* convnet, const char* filename, ccv_convnet_write_param_t params);
2426
/**
2427
 * Free up temporary resources of a given convolutional network.
2428
 * @param convnet A convolutional network.
2429
 */
2430
void ccv_convnet_compact(ccv_convnet_t* convnet);
2431
/**
2432
 * Free up the memory of a given convolutional network.
2433
 * @param convnet A convolutional network.
2434
 */
2435
void ccv_convnet_free(ccv_convnet_t* convnet);
2436
/** @} */
2437
2438
/* add for command-line outputs, b/c ccv's training steps has a ton of outputs,
2439
 * and in the future, it can be piped into callback functions for critical information
2440
 * (such as the on-going missing rate, or iterations etc.) */
2441
2442
enum {
2443
  CCV_CLI_ERROR = 1 << 2,
2444
  CCV_CLI_INFO = 1 << 1,
2445
  CCV_CLI_VERBOSE = 1,
2446
  CCV_CLI_NONE = 0,
2447
};
2448
2449
int ccv_cli_output_level_and_above(int level);
2450
void ccv_cli_set_output_levels(int level);
2451
int ccv_cli_get_output_levels(void);
2452
2453
#define CCV_CLI_SET_OUTPUT_LEVEL_AND_ABOVE(level) ccv_cli_set_output_levels(ccv_cli_output_level_and_above(level))
2454
4.25M
#define CCV_CLI_OUTPUT_LEVEL_IS(a) (a & ccv_cli_get_output_levels())
2455
2456
#endif