reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-10 c3765bd24fe73747688a0ec2a550f219c9acb384
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "THC/generic/THCTensorSort.h"
#else
 
/* Performs an in-place sort of (keys, values). Only works for slice sizes
   <= 2048 at the moment (slice size == size of keys/values dim `dim`) */
THC_API void THCTensor_(sortKeyValueInplace)(THCState* state,
                                             THCTensor* keys,
                                             THCudaLongTensor* values,
                                             int dim, bool dir);
 
/* Performs an out-of-place sort of `input`, returning the per-slice indices
   in `indices` and the sorted values in `sorted` */
THC_API void THCTensor_(sort)(THCState* state,
                              THCTensor* sorted,
                              THCudaLongTensor* indices,
                              THCTensor* input,
                              int dim, int order);
 
#endif