Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
8f5fa52
NDArrayFactory: eliminated methods to return array pointers.
shugeo Jun 2, 2020
af04763
Corrected tests to eliminated factory empties and creations.
shugeo Jun 2, 2020
b886e8f
Refactored valueOf methods and tests.
shugeo Jun 2, 2020
c3472a9
Fixed usage of legacy create_ factory method.
shugeo Jun 2, 2020
a38c361
Refactored benchmarking without legacy create_ method.
shugeo Jun 3, 2020
48b442c
Refactored tests to eliminated usage of legacy create_ factory method.
shugeo Jun 3, 2020
dcdf56c
Corrected tests to eliminate legacy factory methods usage.
shugeo Jun 3, 2020
4698bd3
Eliminated legacy factory method usage with ops tests.
shugeo Jun 3, 2020
a58bac2
Eliminated factory method create_ with tests.
shugeo Jun 4, 2020
62275ec
Eliminated legacy create_ factory method usage.
shugeo Jun 4, 2020
7c1312d
Eliminated legacy usage for factory method create_
shugeo Jun 4, 2020
63a4235
Eliminated legacy method for create_ with tests.
shugeo Jun 4, 2020
a74c999
Cosmetic changes only.
shugeo Jun 4, 2020
3ee5b9b
Fixed valueOf factory routine definition and usage.
shugeo Jun 5, 2020
ea5c586
Fixed NDArrayFactory class and so on.
shugeo Jun 5, 2020
b67d85c
Fixed implementations.
shugeo Jun 5, 2020
f2ee085
Fixed list ops.
shugeo Jun 5, 2020
2b9bd32
Fixed gather_list and write_list ops.
shugeo Jun 5, 2020
a491b70
Fixed nn ops.
shugeo Jun 5, 2020
628a98c
Fixed misc typo errors.
shugeo Jun 5, 2020
bb88dda
Refactored context to use reference as input/output arrays.
shugeo Jun 8, 2020
b2d5d1c
Fixed benchmarking with refactored context.
shugeo Jun 8, 2020
dede047
Fixed cuda implementation due refactored legacy factory methods creat…
shugeo Jun 8, 2020
b5fca36
Refactored benchmarks with new elementar base.
shugeo Jun 8, 2020
d8cfcdb
Adopted tests to non-pointer arrays.
shugeo Jun 8, 2020
edbbf62
Fixed issues with the first test file.
shugeo Jun 9, 2020
1d6ea1b
Corrected context usage with test.
shugeo Jun 9, 2020
30d3e62
Added Order enum for NDArray orders.
shugeo Jun 9, 2020
5a4fd0b
Refactored factory to eliminated expensive methods.
shugeo Jun 9, 2020
20f83f2
Refactored enum
shugeo Jun 9, 2020
37083ee
Refactored factory for arrays.
shugeo Jun 10, 2020
c815231
Fixed typo with valueOf declaration.
shugeo Jun 10, 2020
2110009
Refactored array factory to use proper order.
shugeo Jun 10, 2020
96b65ab
Refactored array factory construction.
shugeo Jun 10, 2020
ef4d8ac
Adopted ops to refactored create method.
shugeo Jun 11, 2020
85eabb3
Corrected usage of factory create with operations and its helpers.
shugeo Jun 11, 2020
f741ed9
Refactored method for create plain sequence of given data as array.
shugeo Jun 11, 2020
363bc65
Adopt benchmarks to refactored create methods.
shugeo Jun 12, 2020
bbc0c71
Fixed benchmarks with new factor methods.
shugeo Jun 12, 2020
c18cfd1
Fixed AttentionTests to adopt new array factory methods.
shugeo Jun 12, 2020
64ee76f
Fixed tests to use refactored method-creator.
shugeo Jun 15, 2020
ac6dba5
Fixed errors with using refactored create methods.
shugeo Jun 15, 2020
3b57398
Fixed miscelaneous erros with factory create methods.
shugeo Jun 15, 2020
317ed6f
Fixed the first test file for ops.
shugeo Jun 15, 2020
b2cd6e7
Fixed factory create usage with tenth test file.
shugeo Jun 16, 2020
a834dc7
Fixed errors with factory create with eleventh test file.
shugeo Jun 16, 2020
2280f35
Adopted refactored create methods with the twelfth test file.
shugeo Jun 16, 2020
057b948
Adopted refactored array create with the thirteenth test file.
shugeo Jun 17, 2020
2fa85a5
Fixed tests with new array factory methods.
shugeo Jun 17, 2020
3543bcd
Finished with the fourteenth test file.
shugeo Jun 17, 2020
d19b592
Fixed the fifteenth test file with usage factory create.
shugeo Jun 18, 2020
da5167a
Fixed the sixteenth test file with new factory create.
shugeo Jun 18, 2020
6686c8b
Fixed the seventeenth, eighteenth and nineteenth test files with new …
shugeo Jun 18, 2020
c0b0a52
Fixed the second test file with new factory create.
shugeo Jun 18, 2020
a53243b
Fixed the third test file with new factory create.
shugeo Jun 18, 2020
c59c23e
Fixed misc with the third test file.
shugeo Jun 18, 2020
b1a6cc0
Fixed the fourth test file with new factory create methods.
shugeo Jun 19, 2020
b5dec99
Fixed the fifth test file and misc with fourth test file with new fac…
shugeo Jun 19, 2020
a15c0c5
Finished with the fifth test file and fixed the sixth test file.
shugeo Jun 19, 2020
5ba14e1
Finished with the sixth test file and fixed the seventh test file wit…
shugeo Jun 19, 2020
43e9563
Adopt the eighth test file with refactored create methods.
shugeo Jun 22, 2020
39e2beb
Fixed the ninth test file and misc with the eighth test file with new…
shugeo Jun 22, 2020
2d46758
Fixed tests due refactored create methods.
shugeo Jun 22, 2020
8e4459c
Fixed graph tests with refactored methods create.
shugeo Jun 22, 2020
397ff08
Fixed tests to use refactored create methods.
shugeo Jun 22, 2020
2807e09
Fixed test with new factory create.
shugeo Jun 22, 2020
9c356d6
Fixed tests with new factory create methods.
shugeo Jun 23, 2020
cb500d7
Fixed native ops tests and nlp tests with new factory create methods.
shugeo Jun 23, 2020
f62a032
Adopted tests for new factory create methods.
shugeo Jun 23, 2020
d82c966
Fixed tests to use refactored create methods.
shugeo Jun 23, 2020
2b30909
Fixed tests to proper use of refactored create methods.
shugeo Jun 23, 2020
6dc3fcc
Fixed rest tests to proper use refactored create methods.
shugeo Jun 23, 2020
e13ad7b
Refactored usage of create methods with array factory for cuda platform.
shugeo Jun 23, 2020
440324e
Fixed cuda tests to adopt refactored array factory methods.
shugeo Jun 23, 2020
1fb5b49
Fixed link errors with typo with new array factory create methods.
shugeo Jun 23, 2020
276e092
Corrected tests to proper use new create array factory methods.
shugeo Jun 26, 2020
30b4929
Corrected tests with refactored array constructors and variables.
shugeo Jun 26, 2020
b1baa46
Corrected image resize tests to adopt proper size vector creation.
shugeo Jun 26, 2020
033e0d9
Fixed array factory methods usage with image tests and so on.
shugeo Jun 26, 2020
aa8c683
Fixed array factory constructor usage with tests.
shugeo Jun 26, 2020
f3f81c1
Fixed the tenth test file with misc array factory constructions.
shugeo Jun 26, 2020
6727613
Corrected array factory creators usage with ninth test file.
shugeo Jun 26, 2020
96b1a3f
Corrected array factory creators usage with eighth and seventh test f…
shugeo Jun 26, 2020
4c48977
Corrected the sixth test file with refactored array creators.
shugeo Jun 26, 2020
175babc
Corrected the fifth test file to adopt array factory create methods.
shugeo Jun 26, 2020
6431990
Corrected the fourth test file to adopt array factory create methods.
shugeo Jun 26, 2020
58ecc5a
Corrected the third test file to adopt array factory create methods.
shugeo Jun 26, 2020
166724c
Corrected the second test file to adopt array factory create methods.
shugeo Jun 26, 2020
eb04bbd
Corrected the first test file to adopt array factory create methods.
shugeo Jun 26, 2020
96ff7b5
Corrected tests to adopt refactored creators with array factory.
shugeo Jun 26, 2020
e3a9a07
Corrected tests to adopt new array factory creators.
shugeo Jun 26, 2020
6995262
Corrected rest tests to adopt new array factory create methods.
shugeo Jun 26, 2020
bb1a9f9
Fixed cuda typo with new array factory methods.
shugeo Jun 26, 2020
9aace98
Merged with master and adopt master changes with local changes.
shugeo Jun 26, 2020
e82e5af
Fixed misc with merging.
shugeo Jun 26, 2020
31f9198
Fixed tests.
shugeo Jun 27, 2020
7147dcc
Fixed RNG tests.
shugeo Jun 27, 2020
9509555
Merge branch 'master' into shugeo_array_refactor2
shugeo Jul 9, 2020
8e69828
Fixed memory leaks with tests and sru_bp op.
shugeo Jul 10, 2020
d22bca2
Fixed memory leak with bool creation.
shugeo Jul 10, 2020
51b56a3
Fixed memory leak for bool array creation.
shugeo Jul 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 22 additions & 71 deletions libnd4j/include/array/NDArrayFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
//
// Created by raver119 on 2018-09-16.
// @author Oleg Semeniv <oleg.semeniv@gmail.com>
// @author GS (shugeo) <sgazeos@gmail.com>
//

#ifndef DEV_TESTS_NDARRAYFACTORY_H
#define DEV_TESTS_NDARRAYFACTORY_H

#include <vector>
#include <initializer_list>
#include <array/Order.h>
#include <array/NDArray.h>
//#include <memory/Workspace.h>
#include <execution/LaunchContext.h>
Expand All @@ -37,77 +38,51 @@ namespace sd {
template <typename T>
static void memcpyFromVector(void *ptr, const std::vector<T> &vector);
public:
template <typename T>
static NDArray* empty_(sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

static NDArray* empty_(sd::DataType dataType, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray empty(sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

static NDArray empty(sd::DataType dataType, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray* valueOf(const std::initializer_list<Nd4jLong>& shape, T value, char order = 'c', sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray* valueOf(const std::vector<Nd4jLong>& shape, T value, char order = 'c', sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

static NDArray* valueOf(const std::vector<Nd4jLong>& shape, const NDArray& value, char order = 'c', sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray* linspace(T from, T to, Nd4jLong numElements);
static NDArray valueOf(const std::vector<Nd4jLong>& shape, T value, const Order order = sd::kArrayOrderC, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

static NDArray valueOf(const std::vector<Nd4jLong>& shape, const NDArray& value, const Order order = sd::kArrayOrderC, sd::LaunchContext* context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray* create_(const T value, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray* create_(sd::DataType dtype, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray linspace(T from, T to, Nd4jLong numElements);

template <typename T>
static NDArray create(const T value, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray create(sd::DataType dtype, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
template <typename T>
static NDArray create(DataType type, const T scalar, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());


template <typename T>
static NDArray* vector(Nd4jLong length, T startingValue = (T) 0, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray* create_(char order, const std::vector<Nd4jLong> &shape, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

static NDArray* create_( char order, const std::vector<Nd4jLong> &shape, sd::DataType dataType, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

/**
* create with given typed buffer and shape with order.
* \param values - typed buffer with size, computed from shape
* \param shape - vector of dimensions
* \param order - given order of strides (C/F, default C)
* \param context - launch context pointer
*
* \return NDArray with given buffer and shape by given order.
*/
template <typename T>
static NDArray* create_(char order, const std::vector<Nd4jLong> &shape, const std::vector<T> &data, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray create(const T* values, const std::vector<Nd4jLong>& shape, const Order order = sd::kArrayOrderC, sd::LaunchContext* context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray create(char order, const std::vector<Nd4jLong> &shape, const std::vector<T> &data, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray create(sd::DataType dtype, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray create(char order, const std::vector<Nd4jLong> &shape, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray create(char order, const std::vector<Nd4jLong> &shape, sd::DataType dtype, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray create(DataType type, const T scalar, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray create(const std::vector<T> &values, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

#ifndef __JAVACPP_HACK__
// this method only available out of javacpp
/**
* This constructor creates vector of T
*
* @param values
*/
static NDArray vector(Nd4jLong length, T startingValue = (T) 0, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray create(char order, const std::initializer_list<Nd4jLong>& shape, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray create(const std::vector<Nd4jLong> &shape, const std::vector<T> &data = {}, const sd::Order order = sd::kArrayOrderC, sd::LaunchContext* context = sd::LaunchContext::defaultContext());

template <typename T>
static NDArray create(T* buffer, char order, const std::initializer_list<Nd4jLong>& shape, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray create(sd::DataType dtype, const std::vector<Nd4jLong> &shape, const sd::Order order = kArrayOrderC, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

template <typename T>
static NDArray create(char order, const std::vector<Nd4jLong> &shape, const std::initializer_list<T>& data, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray vector(const std::vector<T> &values, sd::LaunchContext* context = sd::LaunchContext ::defaultContext());

#ifndef __JAVACPP_HACK__
/**
* This method creates NDArray from .npy file
* @param fileName
Expand All @@ -120,66 +95,42 @@ namespace sd {
* @return NDArray default dataType UTF8
*/
static NDArray string(const char *string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray* string_(const char *string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray* string_(const std::string &string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray string(const std::string& string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext* context = sd::LaunchContext::defaultContext());

/**
* This factory create array from utf16 string
* @return NDArray default dataType UTF16
*/
static NDArray string(const char16_t* u16string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_(const char16_t* u16string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_(const std::u16string& u16string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string(const std::u16string& u16string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());

/**
* This factory create array from utf32 string
* @return NDArray default dataType UTF32
*/
static NDArray string(const char32_t* u32string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_(const char32_t* u32string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_(const std::u32string& u32string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string(const std::u32string& u32string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());

/**
* This factory create array from vector of utf8 strings
* @return NDArray default dataType UTF8
*/
static NDArray string( const std::vector<Nd4jLong> &shape, const std::initializer_list<const char *> &strings, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray string( const std::vector<Nd4jLong> &shape, const std::initializer_list<std::string> &string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray string( const std::vector<Nd4jLong> &shape, const std::vector<const char *> &strings, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray string( const std::vector<Nd4jLong> &shape, const std::vector<std::string> &string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong> &shape, const std::initializer_list<const char *> &strings, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong> &shape, const std::initializer_list<std::string> &string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong> &shape, const std::vector<const char *> &strings, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong> &shape, const std::vector<std::string> &string, sd::DataType dtype = sd::DataType::UTF8, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());

/**
* This factory create array from vector of utf16 strings
* @return NDArray default dataType UTF16
*/
static NDArray string( const std::vector<Nd4jLong>& shape, const std::initializer_list<const char16_t*>& strings, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string( const std::vector<Nd4jLong>& shape, const std::initializer_list<std::u16string>& string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string( const std::vector<Nd4jLong>& shape, const std::vector<const char16_t*>& strings, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string( const std::vector<Nd4jLong>& shape, const std::vector<std::u16string>& string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::initializer_list<const char16_t*>& strings, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::initializer_list<std::u16string>& string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::vector<const char16_t*>& strings, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::vector<std::u16string>& string, sd::DataType dtype = sd::DataType::UTF16, sd::LaunchContext* context = sd::LaunchContext::defaultContext());

/**
* This factory create array from vector of utf32 strings
* @return NDArray default dataType UTF32
*/
static NDArray string( const std::vector<Nd4jLong>& shape, const std::initializer_list<const char32_t*>& strings, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string( const std::vector<Nd4jLong>& shape, const std::initializer_list<std::u32string>& string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string( const std::vector<Nd4jLong>& shape, const std::vector<const char32_t*>& strings, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray string( const std::vector<Nd4jLong>& shape, const std::vector<std::u32string>& string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::initializer_list<const char32_t*>& strings, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::initializer_list<std::u32string>& string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::vector<const char32_t*>& strings, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());
static NDArray* string_( const std::vector<Nd4jLong>& shape, const std::vector<std::u32string>& string, sd::DataType dtype = sd::DataType::UTF32, sd::LaunchContext* context = sd::LaunchContext::defaultContext());


static ResultSet createSetOfArrs(const Nd4jLong numOfArrs, const void* buffer, const Nd4jLong* shapeInfo, const Nd4jLong* offsets, sd::LaunchContext * context = sd::LaunchContext ::defaultContext());
Expand Down
32 changes: 32 additions & 0 deletions libnd4j/include/array/Order.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2020 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/

//
// Created by shugeo <sgazeos@gmail.com> on 6/9/20.
//

#ifndef LIBND4J__ARRAY__ORDER__H
#define LIBND4J__ARRAY__ORDER__H

namespace sd {
enum Order {
kArrayOrderC = 'c', // C order for strides (rows first)
kArrayOrderFortran = 'f', // Fortran order for strides (columns first)
};
}

#endif //LIBND4J__ARRAY__ORDER__H

Loading