ChunkedArray_API_extensions.i 785 Bytes
Newer Older
1
2
3
4
/*!
 * Copyright (c) 2021 Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See LICENSE file in the project root for license information.
 */
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * Wrap chunked_array.hpp class for SWIG usage.
 *
 * Author: Alberto Ferreira
 */

%{
#include "../include/LightGBM/utils/chunked_array.hpp"
%}

%include "../include/LightGBM/utils/chunked_array.hpp"

using LightGBM::ChunkedArray;

%template(int32ChunkedArray) ChunkedArray<int32_t>;
/* Unfortunately, for the time being,
 * SWIG has issues generating the overloads to coalesce_to()
 * for larger integral types
 * so we won't support that for now:
 */
//%template(int64ChunkedArray) ChunkedArray<int64_t>;
%template(floatChunkedArray) ChunkedArray<float>;
%template(doubleChunkedArray) ChunkedArray<double>;