getArrayIndexFromTensorPos.es6 328 字节
Newer Older
Y
Yanzhan Yang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* eslint-disable */
/**
 * @file 公共方法
 * @author yangmingming
 */
export default `

int getArrayIndexFromTensorPos_TENSOR_NAME(TENSOR_TYPE tensorPos) {
    int index = 0;
    for (int i = 0; i < length_shape_TENSOR_NAME; i++) {
        index += tensorPos[i] * numbers_shape_TENSOR_NAME[i];
    }
    return index;
}
`;