2022-09-29 14:44:20 +08:00
|
|
|
#pragma once
|
2023-08-29 16:06:52 +08:00
|
|
|
#include "core/data_type.h"
|
2022-09-29 14:44:20 +08:00
|
|
|
|
2023-08-29 16:06:52 +08:00
|
|
|
namespace infini {
|
|
|
|
struct GatherMetaData {
|
|
|
|
void *indexValue;
|
|
|
|
DataType indexType;
|
2022-09-29 14:44:20 +08:00
|
|
|
int axis;
|
|
|
|
int inNDim;
|
|
|
|
int outNDim;
|
|
|
|
int idxNDim;
|
|
|
|
int outDim[4];
|
|
|
|
int idxDim[4];
|
|
|
|
int idxStride[4];
|
|
|
|
int inStride[4];
|
2023-08-29 16:06:52 +08:00
|
|
|
};
|
2022-09-29 14:44:20 +08:00
|
|
|
|
2023-08-29 16:06:52 +08:00
|
|
|
void gather_kernel(float *in, float *out, GatherMetaData metaData, size_t num);
|
|
|
|
} // namespace infini
|