diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eea137b..c30d854 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,24 +1,92 @@ name: tests +permissions: + contents: write + on: - push: - branches: - - main + push: + branches: + - main + release: + types: + - published jobs: - build_and_tests: - runs-on: ubuntu-22.04 + build_tests: + name: build + runs-on: ${{ matrix.os }} strategy: fail-fast: true + matrix: + include: + - name: Windows + os: windows-latest + artifact_name: win64 + - name: Linux + os: ubuntu-latest + artifact_name: linux + - name: macOS-x86_64 + os: macos-13 + artifact_name: macos-x86_64 + - name: macOS-arm64 + os: macos-latest + artifact_name: macos-arm64 steps: - name: Checkout codes uses: "actions/checkout@v4" + - name: Install dependencies (macOS) + if: ${{ startsWith(matrix.os, 'macos-') }} + run: | + brew install libomp + - name: Build - run: cmake -S . -B build && cmake --build build --config Release + if: ${{ startsWith(matrix.os, 'ubuntu-') || startsWith(matrix.os, 'windows-') }} + run: | + cmake -S . -B build && cmake --build build --config Release + + - name: Build (macOS) + if: ${{ startsWith(matrix.os, 'macos-') }} + run: | + export OpenMP_ROOT=$(brew --prefix)/opt/libomp + cmake -S . -B build && cmake --build build --config Release - name: GoogleTest Tests - run: cd build && ctest + run: | + cd build + ctest -C Release + + - name: Packaging + run: | + cd build + cpack -C Release + + - name: Archive production artifacts + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v4 + with: + name: package-${{ matrix.artifact_name }} + path: packages/* + + release: + needs: [ build_tests ] + name: release + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: packages + pattern: package-* + merge-multiple: true + + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + packages/* diff --git a/CMakeLists.txt b/CMakeLists.txt index 28a77b5..317b91e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,22 @@ cmake_minimum_required(VERSION 3.14) #include (CMakePrintSystemInformation) #set(CMAKE_CONFIGURATION_TYPES Debug Release) +#if(APPLE) +# set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for macOS" FORCE) +#endif() enable_testing() -project(rindow-matlib VERSION 1.0.0 LANGUAGES CXX C) +project(rindow-matlib VERSION 1.0.1 LANGUAGES CXX C) #set(PROJECT_VERSION_MAJOR 1) #set(PROJECT_VERSION_MINOR 0) -#set(PROJECT_VERSION_PATCH 0) +#set(PROJECT_VERSION_PATCH 1) # GoogleTest requires at least C++14 set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) - +if(APPLE) + set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") +endif() set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(Packing) @@ -22,6 +27,9 @@ add_subdirectory(./tests) if(UNIX AND NOT APPLE) add_subdirectory(./debian) endif() +if(MSVC) + add_subdirectory(./vclib) +endif() message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") message(STATUS "CPACK_PACKAGING_INSTALL_PREFIX: ${CPACK_PACKAGING_INSTALL_PREFIX}") diff --git a/README.md b/README.md index a5cd734..2ff1c4b 100644 --- a/README.md +++ b/README.md @@ -102,12 +102,7 @@ Next, copy the include and lib directories to /usr/local. ```shell $ sudo cp -r usr/include /usr/local/ $ sudo cp -r usr/lib /usr/local/ -``` - -Depending on whether you are using OpenMP or not, you need to set the symbolic link. - -```shell -$ sudo ln -s /usr/local/lib/rindowmatlib-openmp/librindowmatlib.dylib /usr/local/lib/librindowmatlib.dylib +$ brew install libomp ``` How to build from source code on Windows @@ -184,6 +179,7 @@ Download source code from release and extract Install openmp library with brew before build with cmake. ```shell +$ brew install libomp $ cd \path\to\here $ cmake -S . -B build $ cmake --build build --config Release @@ -277,6 +273,6 @@ $ g++ sample.cpp -lrindowmatlib -lm ### Build the sample program on MacOS. ```shell -$ g++ sample.cpp -lrindowmatlib -lm +$ c++ sample.cpp -lrindowmatlib -lm ``` diff --git a/cmake/Packing.cmake b/cmake/Packing.cmake index 108dcfb..6ecdfe3 100644 --- a/cmake/Packing.cmake +++ b/cmake/Packing.cmake @@ -51,7 +51,8 @@ if(MSVC) set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) set(CPACK_PACKAGING_INSTALL_PREFIX ".") elseif(APPLE) - set(CPACK_GENERATOR "TGZ") + set(CPACK_GENERATOR "TGZ") + set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) elseif(UNIX) set(CPACK_GENERATOR "DEB") endif() diff --git a/include/rindow/matlib.h b/include/rindow/matlib.h index 7a301f7..19e3a25 100644 --- a/include/rindow/matlib.h +++ b/include/rindow/matlib.h @@ -30,12 +30,15 @@ enum rindow_matlib_dtype { #if defined(RINDOW_COMPILING_DLL) #define RINDOW_FUNC #define RINDOW_FUNC_DECL extern __declspec(dllexport) + #elif defined(RINDOW_MATLIB_IMPORT) + #define RINDOW_FUNC + #define RINDOW_FUNC_DECL extern __declspec(dllimport) #elif defined(RINDOW_MATLIB_INCLUDING_SOURCE) #define RINDOW_FUNC #define RINDOW_FUNC_DECL #else #define RINDOW_FUNC - #define RINDOW_FUNC_DECL extern __declspec(dllimport) + #define RINDOW_FUNC_DECL extern #endif #endif #else // _MSC_VER @@ -146,7 +149,6 @@ static inline int32_t rindow_matlib_common_dtype_is_bool(int32_t dtype) return 0; } - #ifdef __cplusplus extern "C" { #endif diff --git a/scripts/client_generator.php b/scripts/client_generator.php new file mode 100644 index 0000000..90b3863 --- /dev/null +++ b/scripts/client_generator.php @@ -0,0 +1,345 @@ +preg_types = implode('|',array_map(fn($x) => str_replace('*','\\*',$x),$this->funcDecrWord)); + $this->preg_prefix = implode('|',$this->funcPrefixWord); + } + + private function writeFunc(string $funcName,string $code) : void + { + $fileName = $this->destDir.'/'.$funcName.'.c'; + if(file_put_contents($fileName,$code)===false) { + throw new RuntimeException("write error: ".$fileName); + } + } + + public function generator($argv) : void + { + if(count($argv)==1) { + echo "Usage: php client_generator.php dest-dir [cblas|lapacke|matlib] inputheaders...\n"; + return; + } + $dummy = array_shift($argv); + $this->destDir = array_shift($argv); + $lastpath = substr($this->destDir,-1,1); + if(in_array($lastpath,['/','\\'])) { + $this->destDir = substr($this->destDir,0,-1); + } + if(!is_dir($this->destDir)) { + throw new InvalidArgumentException('destination directory not found.: '.$this->destDir); + } + $headertype = array_shift($argv); + $fpi = null; + $fpo = null; + $funcs = []; + try { + $code = $this->beginTemplate($headertype); + $this->writeFunc('common',$code); + while($inputfile=array_shift($argv)) { + $fpi = fopen($inputfile,'r'); + if($fpi==null) { + throw new RuntimeException("Error opening input file: $inputfile"); + } + $funcs = array_merge($funcs,$this->generate($fpi,$headertype)); + } + } finally { + if($fpi) { + fclose($fpi); + } + } + } + + public function generate(mixed $fpi,string $headertype) : array + { + $excludeFuncs = $this->excludeFuncs; + $eof = false; + $funcs = []; + while(!$eof) { + $line=''; + while(true) { + $next=fgets($fpi); + if(!$next) { + $eof = true; + break; + } + $next = trim($next); + if(substr($next,0,1)=='#') { + break; + } + if(substr($next,0,2)=='/*') { + break; + } + if(substr($next,0,2)=='//') { + break; + } + $line .= trim($next); + if(substr($next,-1,1)==';') { + break; + } + } + $declare = $this->parser($line); + //var_dump($line); + //var_dump($declare); + //echo "PAUSE>"; + //fgets(STDIN); + if($declare==null) { + continue; + } + if(in_array($declare['func'],$excludeFuncs)) { + continue; + } + $code = $this->funcTemplate($declare,$headertype); + $this->writeFunc($declare['func'],$code); + $funcs[] = $declare; + } + return $funcs; + } + + public function parser(string $line) : ?array + { + $tmp = explode(' ',$line); + $head = $tmp[0]; + if(in_array($head,$this->funcDecrWord)) { + $pattern = "/^(".$this->preg_types.") *([A-Za-z0-9_]+) *\\(([^)]+)/"; + preg_match($pattern,$line,$match); + } elseif(in_array($head,$this->funcPrefixWord)) { + $pattern = "/^(".$this->preg_prefix.")* *(".$this->preg_types.") *([A-Za-z0-9_]+) *\\(([^)]+)/"; + preg_match($pattern,$line,$match); + $prefix = array_shift($match); + } else { + return null; + } + if(array_key_exists(1,$match)) { + $return = $match[1]; + } else { + var_dump("unmatch return $line"); + $return = "unknown"; + } + if(array_key_exists(2,$match)) { + $func = $match[2]; + } else { + var_dump("unmatch func $line"); + $func = "unknown"; + } + if(array_key_exists(3,$match)) { + $args = $match[3]; + } else { + var_dump("unmatch args $line"); + $args = ["unknown","unknown"]; + } + $args = explode(',',$args); + $strargs = array_map('trim',$args); + $args = []; + foreach($strargs as $arg) { + $var = null; + $arg = str_replace('*',' *',$arg); + $types2 = explode(' ',$arg); + $types = []; + foreach($types2 as $t) { + if($t) { + $types[] = $t; + } + } + $types = array_map('trim',$types); + if(count($types)>1) { + $var = array_pop($types); + $var = trim($var); + if(substr($var,0,1)=='*') { + $var = substr($var,1); + array_push($types,'*'); + } + } + $type = implode(' ',$types); + $args[] = ['type'=>$type,'var'=>$var]; + } + //var_dump("$return $func"); + //echo "args:"; + //var_dump($args); + //if($func=='cblas_xerbla') { + // var_dump(['return' => $return, 'func'=>$func, 'args'=>$args]); + //} + + return ['return' => $return, 'func'=>$func, 'args'=>$args]; + } + + private function headersTemplate(string $type) : string + { + $header = "#include \n"; + switch ($type) { + case 'cblas': + $header .= "#include \n"; + break; + case 'lapacke': + $header .= "#if _MSC_VER\n"; + $header .= "#include \n"; + $header .= "#define lapack_complex_float _Fcomplex\n"; + $header .= "#define lapack_complex_double _Dcomplex\n"; + $header .= "#endif\n"; + $header .= "#include \n"; + break; + case 'matlib': + $header .= "#include \n"; + $header .= "#include \"vclib.h\"\n"; + break; + default: + throw new \Exception("unkown header type"); + break; + } + return $header; + } + + private function libname($type) : string + { + switch($type) { + case 'cblas': + case 'lapacke': + $libname = 'libopenblas'; + break; + case 'matlib': + $libname = 'rindowmatlib'; + break; + default: + throw new \Exception("unkown header type"); + break; + } + return $libname; + } + public function funcTemplate(array $declare,string $type) : string + { + $return = $declare['return']; + $funcname = $declare['func']; + $libname = $this->libname($type); + // typedef + $code = $this->headersTemplate($type); + $code .= "static char msg_function_not_found[] = \"{$funcname} not found\\n\";\n"; + $code .= "typedef {$return} (CALLBACK* PFN{$funcname})( /* {$funcname} */"; + $isNext = false; + foreach($declare['args'] as $arg) { + $type = $arg['type']; + $var = $arg['var']; + if($isNext) { + $code .= ","; + } + $code .= "\n"; + $code .= " {$type} /* {$var} */"; + $isNext = true; + } + $code .= "\n"; + $code .= ");\n"; + + // static function pointer + $code .= "static PFN{$funcname} _g_{$funcname} = NULL;\n"; + + // proxy function + $code .= "{$return} {$funcname}("; + $isNext = false; + foreach($declare['args'] as $arg) { + $type = $arg['type']; + $var = $arg['var']; + if($isNext) { + $code .= ","; + } + $code .= "\n"; + $code .= " {$type} {$var}"; + $isNext = true; + } + $code .= "\n"; + $code .= ")\n"; + $code .= "{\n"; + $code .= " if(_g_{$funcname}==NULL) {\n"; + $code .= " _g_{$funcname} = rindow_load_{$libname}_func(\"$funcname\"); \n"; + $code .= " if(_g_{$funcname}==NULL) {\n"; + $code .= " HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);\n"; + $code .= " WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL);\n"; + if($return=='void') { + $code .= " return;\n"; + } else { + $code .= " return 0;\n"; + } + $code .= " }\n"; + $code .= " }\n"; + if($return=='void') { + $code .= " _g_{$funcname}("; + } else { + $code .= " return _g_{$funcname}("; + } + $isNext = false; + foreach($declare['args'] as $arg) { + $type = $arg['type']; + $var = $arg['var']; + if($isNext) { + $code .= ","; + } + $code .= "\n"; + if($var) { + $code .= " {$var}"; + } + $isNext = true; + } + $code .= " \n"; + $code .= " );\n"; + $code .= "}\n"; + return $code; + } + + function beginTemplate(string $type) : string + { + $libname = $this->libname($type); + $code = $this->headersTemplate($type); + $code .= "\n"; + $code .= "static HMODULE _h_{$libname} = NULL;\n"; + $code .= "static char msg_load_error[] = \"Load error: {$libname}\\n\";\n"; + $code .= "void* rindow_load_{$libname}_func(char *funcname)\n"; + $code .= "{\n"; + $code .= " if(_h_{$libname}==NULL) {\n"; + $code .= " _h_{$libname} = LoadLibraryA( \"{$libname}.dll\" );\n"; + $code .= " if(_h_{$libname}==NULL) {\n"; + $code .= " HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);\n"; + $code .= " WriteConsole(hStdOut, msg_load_error, sizeof(msg_load_error), NULL, NULL);\n"; + $code .= " return NULL;\n"; + $code .= " }\n"; + $code .= " }\n"; + $code .= " return GetProcAddress( _h_{$libname}, funcname );\n"; + $code .= "}\n"; + return $code; + } +} + +$generator = new OpenBLASClientGenerator(); +$generator->generator($argv); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d8637b..24d9f6b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +if(APPLE) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/opt/local/share/cmake") +endif() find_package(Threads REQUIRED) @@ -15,7 +18,7 @@ configure_file( "${CMAKE_CURRENT_BINARY_DIR}/rindow_matlib_config.h" ) -file(GLOB_RECURSE srcfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ./*.c) +file(GLOB_RECURSE srcfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ./*.c ./*.cpp) add_library(rindowmatlib SHARED ${srcfiles}) target_compile_options(rindowmatlib PRIVATE -DRINDOW_COMPILING_DLL) @@ -35,7 +38,7 @@ endif() target_include_directories(rindowmatlib PUBLIC "${PROJECT_SOURCE_DIR}/include") target_include_directories(rindowmatlib PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") - + if (MSVC) install( @@ -45,7 +48,12 @@ if (MSVC) ) install( TARGETS rindowmatlib - ARCHIVE DESTINATION lib + ARCHIVE DESTINATION lib/import + COMPONENT ${PROJECT_NAME} + ) +elseif(APPLE) + install( + TARGETS rindowmatlib COMPONENT ${PROJECT_NAME} ) elseif(UNIX) diff --git a/src/onehot.c b/src/onehot.c index 6c5b7d2..7e4115d 100644 --- a/src/onehot.c +++ b/src/onehot.c @@ -26,15 +26,8 @@ int32_t rindow_matlib_s_onehot( return -1; } alloc_flag = 1; - int32_t i; - #pragma omp parallel for - for(i=0;i +#include +#include "vclib.h" + +static HMODULE _h_rindowmatlib = NULL; +static char msg_load_error[] = "Load error: rindowmatlib\n"; +void* rindow_load_rindowmatlib_func(char *funcname) +{ + if(_h_rindowmatlib==NULL) { + _h_rindowmatlib = LoadLibraryA( "rindowmatlib.dll" ); + if(_h_rindowmatlib==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_load_error, sizeof(msg_load_error), NULL, NULL); + return NULL; + } + } + return GetProcAddress( _h_rindowmatlib, funcname ); +} diff --git a/vclib/rindow_matlib_astype.c b/vclib/rindow_matlib_astype.c new file mode 100644 index 0000000..ffcc26d --- /dev/null +++ b/vclib/rindow_matlib_astype.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_astype not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_astype)( /* rindow_matlib_astype */ + int32_t /* n */, + int32_t /* from_dtype */, + void * /* x */, + int32_t /* incX */, + int32_t /* to_dtype */, + void * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_astype _g_rindow_matlib_astype = NULL; +int32_t rindow_matlib_astype( + int32_t n, + int32_t from_dtype, + void * x, + int32_t incX, + int32_t to_dtype, + void * y, + int32_t incY +) +{ + if(_g_rindow_matlib_astype==NULL) { + _g_rindow_matlib_astype = rindow_load_rindowmatlib_func("rindow_matlib_astype"); + if(_g_rindow_matlib_astype==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_astype( + n, + from_dtype, + x, + incX, + to_dtype, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_common_get_address.c b/vclib/rindow_matlib_common_get_address.c new file mode 100644 index 0000000..92ae3e6 --- /dev/null +++ b/vclib/rindow_matlib_common_get_address.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_common_get_address not found\n"; +typedef void* (CALLBACK* PFNrindow_matlib_common_get_address)( /* rindow_matlib_common_get_address */ + int32_t /* dtype */, + void * /* buffer */, + int32_t /* offset */ +); +static PFNrindow_matlib_common_get_address _g_rindow_matlib_common_get_address = NULL; +void* rindow_matlib_common_get_address( + int32_t dtype, + void * buffer, + int32_t offset +) +{ + if(_g_rindow_matlib_common_get_address==NULL) { + _g_rindow_matlib_common_get_address = rindow_load_rindowmatlib_func("rindow_matlib_common_get_address"); + if(_g_rindow_matlib_common_get_address==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_common_get_address( + dtype, + buffer, + offset + ); +} diff --git a/vclib/rindow_matlib_common_get_nprocs.c b/vclib/rindow_matlib_common_get_nprocs.c new file mode 100644 index 0000000..b13d44f --- /dev/null +++ b/vclib/rindow_matlib_common_get_nprocs.c @@ -0,0 +1,24 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_common_get_nprocs not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_common_get_nprocs)( /* rindow_matlib_common_get_nprocs */ + void /* */ +); +static PFNrindow_matlib_common_get_nprocs _g_rindow_matlib_common_get_nprocs = NULL; +int32_t rindow_matlib_common_get_nprocs( + void +) +{ + if(_g_rindow_matlib_common_get_nprocs==NULL) { + _g_rindow_matlib_common_get_nprocs = rindow_load_rindowmatlib_func("rindow_matlib_common_get_nprocs"); + if(_g_rindow_matlib_common_get_nprocs==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_common_get_nprocs( + + ); +} diff --git a/vclib/rindow_matlib_common_get_num_threads.c b/vclib/rindow_matlib_common_get_num_threads.c new file mode 100644 index 0000000..cd2d845 --- /dev/null +++ b/vclib/rindow_matlib_common_get_num_threads.c @@ -0,0 +1,24 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_common_get_num_threads not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_common_get_num_threads)( /* rindow_matlib_common_get_num_threads */ + void /* */ +); +static PFNrindow_matlib_common_get_num_threads _g_rindow_matlib_common_get_num_threads = NULL; +int32_t rindow_matlib_common_get_num_threads( + void +) +{ + if(_g_rindow_matlib_common_get_num_threads==NULL) { + _g_rindow_matlib_common_get_num_threads = rindow_load_rindowmatlib_func("rindow_matlib_common_get_num_threads"); + if(_g_rindow_matlib_common_get_num_threads==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_common_get_num_threads( + + ); +} diff --git a/vclib/rindow_matlib_common_get_parallel.c b/vclib/rindow_matlib_common_get_parallel.c new file mode 100644 index 0000000..6b26685 --- /dev/null +++ b/vclib/rindow_matlib_common_get_parallel.c @@ -0,0 +1,24 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_common_get_parallel not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_common_get_parallel)( /* rindow_matlib_common_get_parallel */ + void /* */ +); +static PFNrindow_matlib_common_get_parallel _g_rindow_matlib_common_get_parallel = NULL; +int32_t rindow_matlib_common_get_parallel( + void +) +{ + if(_g_rindow_matlib_common_get_parallel==NULL) { + _g_rindow_matlib_common_get_parallel = rindow_load_rindowmatlib_func("rindow_matlib_common_get_parallel"); + if(_g_rindow_matlib_common_get_parallel==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_common_get_parallel( + + ); +} diff --git a/vclib/rindow_matlib_common_get_version.c b/vclib/rindow_matlib_common_get_version.c new file mode 100644 index 0000000..6ba1243 --- /dev/null +++ b/vclib/rindow_matlib_common_get_version.c @@ -0,0 +1,24 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_common_get_version not found\n"; +typedef char* (CALLBACK* PFNrindow_matlib_common_get_version)( /* rindow_matlib_common_get_version */ + void /* */ +); +static PFNrindow_matlib_common_get_version _g_rindow_matlib_common_get_version = NULL; +char* rindow_matlib_common_get_version( + void +) +{ + if(_g_rindow_matlib_common_get_version==NULL) { + _g_rindow_matlib_common_get_version = rindow_load_rindowmatlib_func("rindow_matlib_common_get_version"); + if(_g_rindow_matlib_common_get_version==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_common_get_version( + + ); +} diff --git a/vclib/rindow_matlib_d_add.c b/vclib/rindow_matlib_d_add.c new file mode 100644 index 0000000..de757af --- /dev/null +++ b/vclib/rindow_matlib_d_add.c @@ -0,0 +1,45 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_add not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_add)( /* rindow_matlib_d_add */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + double /* alpha */, + double * /* x */, + int32_t /* incX */, + double * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_d_add _g_rindow_matlib_d_add = NULL; +void rindow_matlib_d_add( + int32_t trans, + int32_t m, + int32_t n, + double alpha, + double * x, + int32_t incX, + double * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_d_add==NULL) { + _g_rindow_matlib_d_add = rindow_load_rindowmatlib_func("rindow_matlib_d_add"); + if(_g_rindow_matlib_d_add==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_add( + trans, + m, + n, + alpha, + x, + incX, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_d_bandpart.c b/vclib/rindow_matlib_d_bandpart.c new file mode 100644 index 0000000..51319a8 --- /dev/null +++ b/vclib/rindow_matlib_d_bandpart.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_bandpart not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_bandpart)( /* rindow_matlib_d_bandpart */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + double * /* a */, + int32_t /* lower */, + int32_t /* upper */ +); +static PFNrindow_matlib_d_bandpart _g_rindow_matlib_d_bandpart = NULL; +void rindow_matlib_d_bandpart( + int32_t m, + int32_t n, + int32_t k, + double * a, + int32_t lower, + int32_t upper +) +{ + if(_g_rindow_matlib_d_bandpart==NULL) { + _g_rindow_matlib_d_bandpart = rindow_load_rindowmatlib_func("rindow_matlib_d_bandpart"); + if(_g_rindow_matlib_d_bandpart==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_bandpart( + m, + n, + k, + a, + lower, + upper + ); +} diff --git a/vclib/rindow_matlib_d_cos.c b/vclib/rindow_matlib_d_cos.c new file mode 100644 index 0000000..00e20ae --- /dev/null +++ b/vclib/rindow_matlib_d_cos.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_cos not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_cos)( /* rindow_matlib_d_cos */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_cos _g_rindow_matlib_d_cos = NULL; +void rindow_matlib_d_cos( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_cos==NULL) { + _g_rindow_matlib_d_cos = rindow_load_rindowmatlib_func("rindow_matlib_d_cos"); + if(_g_rindow_matlib_d_cos==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_cos( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_cumsum.c b/vclib/rindow_matlib_d_cumsum.c new file mode 100644 index 0000000..1c00631 --- /dev/null +++ b/vclib/rindow_matlib_d_cumsum.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_cumsum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_cumsum)( /* rindow_matlib_d_cumsum */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + int32_t /* exclusive */, + int32_t /* reverse */, + double * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_d_cumsum _g_rindow_matlib_d_cumsum = NULL; +void rindow_matlib_d_cumsum( + int32_t n, + double * x, + int32_t incX, + int32_t exclusive, + int32_t reverse, + double * y, + int32_t incY +) +{ + if(_g_rindow_matlib_d_cumsum==NULL) { + _g_rindow_matlib_d_cumsum = rindow_load_rindowmatlib_func("rindow_matlib_d_cumsum"); + if(_g_rindow_matlib_d_cumsum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_cumsum( + n, + x, + incX, + exclusive, + reverse, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_d_duplicate.c b/vclib/rindow_matlib_d_duplicate.c new file mode 100644 index 0000000..12288d5 --- /dev/null +++ b/vclib/rindow_matlib_d_duplicate.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_duplicate not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_duplicate)( /* rindow_matlib_d_duplicate */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_d_duplicate _g_rindow_matlib_d_duplicate = NULL; +void rindow_matlib_d_duplicate( + int32_t trans, + int32_t m, + int32_t n, + double * x, + int32_t incX, + double * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_d_duplicate==NULL) { + _g_rindow_matlib_d_duplicate = rindow_load_rindowmatlib_func("rindow_matlib_d_duplicate"); + if(_g_rindow_matlib_d_duplicate==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_duplicate( + trans, + m, + n, + x, + incX, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_d_equal.c b/vclib/rindow_matlib_d_equal.c new file mode 100644 index 0000000..4185d8e --- /dev/null +++ b/vclib/rindow_matlib_d_equal.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_equal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_equal)( /* rindow_matlib_d_equal */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_d_equal _g_rindow_matlib_d_equal = NULL; +void rindow_matlib_d_equal( + int32_t n, + double * x, + int32_t incX, + double * y, + int32_t incY +) +{ + if(_g_rindow_matlib_d_equal==NULL) { + _g_rindow_matlib_d_equal = rindow_load_rindowmatlib_func("rindow_matlib_d_equal"); + if(_g_rindow_matlib_d_equal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_equal( + n, + x, + incX, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_d_exp.c b/vclib/rindow_matlib_d_exp.c new file mode 100644 index 0000000..56cb2fe --- /dev/null +++ b/vclib/rindow_matlib_d_exp.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_exp not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_exp)( /* rindow_matlib_d_exp */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_exp _g_rindow_matlib_d_exp = NULL; +void rindow_matlib_d_exp( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_exp==NULL) { + _g_rindow_matlib_d_exp = rindow_load_rindowmatlib_func("rindow_matlib_d_exp"); + if(_g_rindow_matlib_d_exp==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_exp( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_gather.c b/vclib/rindow_matlib_d_gather.c new file mode 100644 index 0000000..464ffb9 --- /dev/null +++ b/vclib/rindow_matlib_d_gather.c @@ -0,0 +1,48 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_gather not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_d_gather)( /* rindow_matlib_d_gather */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* n */, + int32_t /* k */, + int32_t /* numClass */, + int32_t /* dtype */, + void * /* x */, + double * /* a */, + double * /* b */ +); +static PFNrindow_matlib_d_gather _g_rindow_matlib_d_gather = NULL; +int32_t rindow_matlib_d_gather( + int32_t reverse, + int32_t addMode, + int32_t n, + int32_t k, + int32_t numClass, + int32_t dtype, + void * x, + double * a, + double * b +) +{ + if(_g_rindow_matlib_d_gather==NULL) { + _g_rindow_matlib_d_gather = rindow_load_rindowmatlib_func("rindow_matlib_d_gather"); + if(_g_rindow_matlib_d_gather==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_d_gather( + reverse, + addMode, + n, + k, + numClass, + dtype, + x, + a, + b + ); +} diff --git a/vclib/rindow_matlib_d_greater.c b/vclib/rindow_matlib_d_greater.c new file mode 100644 index 0000000..379c929 --- /dev/null +++ b/vclib/rindow_matlib_d_greater.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_greater not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_greater)( /* rindow_matlib_d_greater */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_greater _g_rindow_matlib_d_greater = NULL; +void rindow_matlib_d_greater( + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_greater==NULL) { + _g_rindow_matlib_d_greater = rindow_load_rindowmatlib_func("rindow_matlib_d_greater"); + if(_g_rindow_matlib_d_greater==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_greater( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_greater_equal.c b/vclib/rindow_matlib_d_greater_equal.c new file mode 100644 index 0000000..1556586 --- /dev/null +++ b/vclib/rindow_matlib_d_greater_equal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_greater_equal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_greater_equal)( /* rindow_matlib_d_greater_equal */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_greater_equal _g_rindow_matlib_d_greater_equal = NULL; +void rindow_matlib_d_greater_equal( + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_greater_equal==NULL) { + _g_rindow_matlib_d_greater_equal = rindow_load_rindowmatlib_func("rindow_matlib_d_greater_equal"); + if(_g_rindow_matlib_d_greater_equal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_greater_equal( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_imagecopy.c b/vclib/rindow_matlib_d_imagecopy.c new file mode 100644 index 0000000..2789ebc --- /dev/null +++ b/vclib/rindow_matlib_d_imagecopy.c @@ -0,0 +1,54 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_imagecopy not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_imagecopy)( /* rindow_matlib_d_imagecopy */ + int32_t /* height */, + int32_t /* width */, + int32_t /* channels */, + double * /* a */, + double * /* b */, + int32_t /* channelsFirst */, + int32_t /* heightShift */, + int32_t /* widthShift */, + int32_t /* verticalFlip */, + int32_t /* horizontalFlip */, + int32_t /* rgbFlip */ +); +static PFNrindow_matlib_d_imagecopy _g_rindow_matlib_d_imagecopy = NULL; +void rindow_matlib_d_imagecopy( + int32_t height, + int32_t width, + int32_t channels, + double * a, + double * b, + int32_t channelsFirst, + int32_t heightShift, + int32_t widthShift, + int32_t verticalFlip, + int32_t horizontalFlip, + int32_t rgbFlip +) +{ + if(_g_rindow_matlib_d_imagecopy==NULL) { + _g_rindow_matlib_d_imagecopy = rindow_load_rindowmatlib_func("rindow_matlib_d_imagecopy"); + if(_g_rindow_matlib_d_imagecopy==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_imagecopy( + height, + width, + channels, + a, + b, + channelsFirst, + heightShift, + widthShift, + verticalFlip, + horizontalFlip, + rgbFlip + ); +} diff --git a/vclib/rindow_matlib_d_imax.c b/vclib/rindow_matlib_d_imax.c new file mode 100644 index 0000000..6eefc06 --- /dev/null +++ b/vclib/rindow_matlib_d_imax.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_imax not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_d_imax)( /* rindow_matlib_d_imax */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_imax _g_rindow_matlib_d_imax = NULL; +int32_t rindow_matlib_d_imax( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_imax==NULL) { + _g_rindow_matlib_d_imax = rindow_load_rindowmatlib_func("rindow_matlib_d_imax"); + if(_g_rindow_matlib_d_imax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_d_imax( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_imin.c b/vclib/rindow_matlib_d_imin.c new file mode 100644 index 0000000..84f6ce2 --- /dev/null +++ b/vclib/rindow_matlib_d_imin.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_imin not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_d_imin)( /* rindow_matlib_d_imin */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_imin _g_rindow_matlib_d_imin = NULL; +int32_t rindow_matlib_d_imin( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_imin==NULL) { + _g_rindow_matlib_d_imin = rindow_load_rindowmatlib_func("rindow_matlib_d_imin"); + if(_g_rindow_matlib_d_imin==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_d_imin( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_increment.c b/vclib/rindow_matlib_d_increment.c new file mode 100644 index 0000000..17b0b63 --- /dev/null +++ b/vclib/rindow_matlib_d_increment.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_increment not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_increment)( /* rindow_matlib_d_increment */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double /* alpha */, + double /* beta */ +); +static PFNrindow_matlib_d_increment _g_rindow_matlib_d_increment = NULL; +void rindow_matlib_d_increment( + int32_t n, + double * x, + int32_t incX, + double alpha, + double beta +) +{ + if(_g_rindow_matlib_d_increment==NULL) { + _g_rindow_matlib_d_increment = rindow_load_rindowmatlib_func("rindow_matlib_d_increment"); + if(_g_rindow_matlib_d_increment==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_increment( + n, + x, + incX, + alpha, + beta + ); +} diff --git a/vclib/rindow_matlib_d_isnan.c b/vclib/rindow_matlib_d_isnan.c new file mode 100644 index 0000000..2f4de3a --- /dev/null +++ b/vclib/rindow_matlib_d_isnan.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_isnan not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_isnan)( /* rindow_matlib_d_isnan */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_isnan _g_rindow_matlib_d_isnan = NULL; +void rindow_matlib_d_isnan( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_isnan==NULL) { + _g_rindow_matlib_d_isnan = rindow_load_rindowmatlib_func("rindow_matlib_d_isnan"); + if(_g_rindow_matlib_d_isnan==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_isnan( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_less.c b/vclib/rindow_matlib_d_less.c new file mode 100644 index 0000000..721854d --- /dev/null +++ b/vclib/rindow_matlib_d_less.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_less not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_less)( /* rindow_matlib_d_less */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_less _g_rindow_matlib_d_less = NULL; +void rindow_matlib_d_less( + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_less==NULL) { + _g_rindow_matlib_d_less = rindow_load_rindowmatlib_func("rindow_matlib_d_less"); + if(_g_rindow_matlib_d_less==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_less( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_less_equal.c b/vclib/rindow_matlib_d_less_equal.c new file mode 100644 index 0000000..12a93dc --- /dev/null +++ b/vclib/rindow_matlib_d_less_equal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_less_equal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_less_equal)( /* rindow_matlib_d_less_equal */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_less_equal _g_rindow_matlib_d_less_equal = NULL; +void rindow_matlib_d_less_equal( + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_less_equal==NULL) { + _g_rindow_matlib_d_less_equal = rindow_load_rindowmatlib_func("rindow_matlib_d_less_equal"); + if(_g_rindow_matlib_d_less_equal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_less_equal( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_log.c b/vclib/rindow_matlib_d_log.c new file mode 100644 index 0000000..c5b8301 --- /dev/null +++ b/vclib/rindow_matlib_d_log.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_log not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_log)( /* rindow_matlib_d_log */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_log _g_rindow_matlib_d_log = NULL; +void rindow_matlib_d_log( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_log==NULL) { + _g_rindow_matlib_d_log = rindow_load_rindowmatlib_func("rindow_matlib_d_log"); + if(_g_rindow_matlib_d_log==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_log( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_matrixcopy.c b/vclib/rindow_matlib_d_matrixcopy.c new file mode 100644 index 0000000..fe7599b --- /dev/null +++ b/vclib/rindow_matlib_d_matrixcopy.c @@ -0,0 +1,45 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_matrixcopy not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_matrixcopy)( /* rindow_matlib_d_matrixcopy */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + double /* alpha */, + double * /* a */, + int32_t /* ldA */, + double * /* b */, + int32_t /* ldB */ +); +static PFNrindow_matlib_d_matrixcopy _g_rindow_matlib_d_matrixcopy = NULL; +void rindow_matlib_d_matrixcopy( + int32_t trans, + int32_t m, + int32_t n, + double alpha, + double * a, + int32_t ldA, + double * b, + int32_t ldB +) +{ + if(_g_rindow_matlib_d_matrixcopy==NULL) { + _g_rindow_matlib_d_matrixcopy = rindow_load_rindowmatlib_func("rindow_matlib_d_matrixcopy"); + if(_g_rindow_matlib_d_matrixcopy==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_matrixcopy( + trans, + m, + n, + alpha, + a, + ldA, + b, + ldB + ); +} diff --git a/vclib/rindow_matlib_d_maximum.c b/vclib/rindow_matlib_d_maximum.c new file mode 100644 index 0000000..bbdfa68 --- /dev/null +++ b/vclib/rindow_matlib_d_maximum.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_maximum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_maximum)( /* rindow_matlib_d_maximum */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_maximum _g_rindow_matlib_d_maximum = NULL; +void rindow_matlib_d_maximum( + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_maximum==NULL) { + _g_rindow_matlib_d_maximum = rindow_load_rindowmatlib_func("rindow_matlib_d_maximum"); + if(_g_rindow_matlib_d_maximum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_maximum( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_minimum.c b/vclib/rindow_matlib_d_minimum.c new file mode 100644 index 0000000..0233dda --- /dev/null +++ b/vclib/rindow_matlib_d_minimum.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_minimum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_minimum)( /* rindow_matlib_d_minimum */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_minimum _g_rindow_matlib_d_minimum = NULL; +void rindow_matlib_d_minimum( + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_minimum==NULL) { + _g_rindow_matlib_d_minimum = rindow_load_rindowmatlib_func("rindow_matlib_d_minimum"); + if(_g_rindow_matlib_d_minimum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_minimum( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_multiply.c b/vclib/rindow_matlib_d_multiply.c new file mode 100644 index 0000000..5393bcf --- /dev/null +++ b/vclib/rindow_matlib_d_multiply.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_multiply not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_multiply)( /* rindow_matlib_d_multiply */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_d_multiply _g_rindow_matlib_d_multiply = NULL; +void rindow_matlib_d_multiply( + int32_t trans, + int32_t m, + int32_t n, + double * x, + int32_t incX, + double * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_d_multiply==NULL) { + _g_rindow_matlib_d_multiply = rindow_load_rindowmatlib_func("rindow_matlib_d_multiply"); + if(_g_rindow_matlib_d_multiply==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_multiply( + trans, + m, + n, + x, + incX, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_d_nan2num.c b/vclib/rindow_matlib_d_nan2num.c new file mode 100644 index 0000000..61cafcf --- /dev/null +++ b/vclib/rindow_matlib_d_nan2num.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_nan2num not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_nan2num)( /* rindow_matlib_d_nan2num */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double /* alpha */ +); +static PFNrindow_matlib_d_nan2num _g_rindow_matlib_d_nan2num = NULL; +void rindow_matlib_d_nan2num( + int32_t n, + double * x, + int32_t incX, + double alpha +) +{ + if(_g_rindow_matlib_d_nan2num==NULL) { + _g_rindow_matlib_d_nan2num = rindow_load_rindowmatlib_func("rindow_matlib_d_nan2num"); + if(_g_rindow_matlib_d_nan2num==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_nan2num( + n, + x, + incX, + alpha + ); +} diff --git a/vclib/rindow_matlib_d_not.c b/vclib/rindow_matlib_d_not.c new file mode 100644 index 0000000..466b8e8 --- /dev/null +++ b/vclib/rindow_matlib_d_not.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_not not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_not)( /* rindow_matlib_d_not */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_not _g_rindow_matlib_d_not = NULL; +void rindow_matlib_d_not( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_not==NULL) { + _g_rindow_matlib_d_not = rindow_load_rindowmatlib_func("rindow_matlib_d_not"); + if(_g_rindow_matlib_d_not==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_not( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_notequal.c b/vclib/rindow_matlib_d_notequal.c new file mode 100644 index 0000000..8cf8763 --- /dev/null +++ b/vclib/rindow_matlib_d_notequal.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_notequal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_notequal)( /* rindow_matlib_d_notequal */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_d_notequal _g_rindow_matlib_d_notequal = NULL; +void rindow_matlib_d_notequal( + int32_t n, + double * x, + int32_t incX, + double * y, + int32_t incY +) +{ + if(_g_rindow_matlib_d_notequal==NULL) { + _g_rindow_matlib_d_notequal = rindow_load_rindowmatlib_func("rindow_matlib_d_notequal"); + if(_g_rindow_matlib_d_notequal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_notequal( + n, + x, + incX, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_d_onehot.c b/vclib/rindow_matlib_d_onehot.c new file mode 100644 index 0000000..d7c5136 --- /dev/null +++ b/vclib/rindow_matlib_d_onehot.c @@ -0,0 +1,45 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_onehot not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_d_onehot)( /* rindow_matlib_d_onehot */ + int32_t /* dtype */, + int32_t /* m */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */, + double /* alpha */, + double * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_d_onehot _g_rindow_matlib_d_onehot = NULL; +int32_t rindow_matlib_d_onehot( + int32_t dtype, + int32_t m, + int32_t n, + void * x, + int32_t incX, + double alpha, + double * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_d_onehot==NULL) { + _g_rindow_matlib_d_onehot = rindow_load_rindowmatlib_func("rindow_matlib_d_onehot"); + if(_g_rindow_matlib_d_onehot==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_d_onehot( + dtype, + m, + n, + x, + incX, + alpha, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_d_pow.c b/vclib/rindow_matlib_d_pow.c new file mode 100644 index 0000000..9dd40d2 --- /dev/null +++ b/vclib/rindow_matlib_d_pow.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_pow not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_pow)( /* rindow_matlib_d_pow */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_pow _g_rindow_matlib_d_pow = NULL; +void rindow_matlib_d_pow( + int32_t trans, + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_pow==NULL) { + _g_rindow_matlib_d_pow = rindow_load_rindowmatlib_func("rindow_matlib_d_pow"); + if(_g_rindow_matlib_d_pow==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_pow( + trans, + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_randomnormal.c b/vclib/rindow_matlib_d_randomnormal.c new file mode 100644 index 0000000..926bc9b --- /dev/null +++ b/vclib/rindow_matlib_d_randomnormal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_randomnormal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_randomnormal)( /* rindow_matlib_d_randomnormal */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double /* mean */, + double /* scale */, + int32_t /* seed */ +); +static PFNrindow_matlib_d_randomnormal _g_rindow_matlib_d_randomnormal = NULL; +void rindow_matlib_d_randomnormal( + int32_t n, + double * x, + int32_t incX, + double mean, + double scale, + int32_t seed +) +{ + if(_g_rindow_matlib_d_randomnormal==NULL) { + _g_rindow_matlib_d_randomnormal = rindow_load_rindowmatlib_func("rindow_matlib_d_randomnormal"); + if(_g_rindow_matlib_d_randomnormal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_randomnormal( + n, + x, + incX, + mean, + scale, + seed + ); +} diff --git a/vclib/rindow_matlib_d_randomuniform.c b/vclib/rindow_matlib_d_randomuniform.c new file mode 100644 index 0000000..b9331e0 --- /dev/null +++ b/vclib/rindow_matlib_d_randomuniform.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_randomuniform not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_randomuniform)( /* rindow_matlib_d_randomuniform */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double /* low */, + double /* high */, + int32_t /* seed */ +); +static PFNrindow_matlib_d_randomuniform _g_rindow_matlib_d_randomuniform = NULL; +void rindow_matlib_d_randomuniform( + int32_t n, + double * x, + int32_t incX, + double low, + double high, + int32_t seed +) +{ + if(_g_rindow_matlib_d_randomuniform==NULL) { + _g_rindow_matlib_d_randomuniform = rindow_load_rindowmatlib_func("rindow_matlib_d_randomuniform"); + if(_g_rindow_matlib_d_randomuniform==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_randomuniform( + n, + x, + incX, + low, + high, + seed + ); +} diff --git a/vclib/rindow_matlib_d_reciprocal.c b/vclib/rindow_matlib_d_reciprocal.c new file mode 100644 index 0000000..170e135 --- /dev/null +++ b/vclib/rindow_matlib_d_reciprocal.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_reciprocal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_reciprocal)( /* rindow_matlib_d_reciprocal */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */, + double /* alpha */, + double /* beta */ +); +static PFNrindow_matlib_d_reciprocal _g_rindow_matlib_d_reciprocal = NULL; +void rindow_matlib_d_reciprocal( + int32_t n, + double * x, + int32_t incX, + double alpha, + double beta +) +{ + if(_g_rindow_matlib_d_reciprocal==NULL) { + _g_rindow_matlib_d_reciprocal = rindow_load_rindowmatlib_func("rindow_matlib_d_reciprocal"); + if(_g_rindow_matlib_d_reciprocal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_reciprocal( + n, + x, + incX, + alpha, + beta + ); +} diff --git a/vclib/rindow_matlib_d_reduceargmax.c b/vclib/rindow_matlib_d_reduceargmax.c new file mode 100644 index 0000000..4239996 --- /dev/null +++ b/vclib/rindow_matlib_d_reduceargmax.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_reduceargmax not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_reduceargmax)( /* rindow_matlib_d_reduceargmax */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + double * /* a */, + int32_t /* dtype */, + void * /* b */ +); +static PFNrindow_matlib_d_reduceargmax _g_rindow_matlib_d_reduceargmax = NULL; +void rindow_matlib_d_reduceargmax( + int32_t m, + int32_t n, + int32_t k, + double * a, + int32_t dtype, + void * b +) +{ + if(_g_rindow_matlib_d_reduceargmax==NULL) { + _g_rindow_matlib_d_reduceargmax = rindow_load_rindowmatlib_func("rindow_matlib_d_reduceargmax"); + if(_g_rindow_matlib_d_reduceargmax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_reduceargmax( + m, + n, + k, + a, + dtype, + b + ); +} diff --git a/vclib/rindow_matlib_d_reducegather.c b/vclib/rindow_matlib_d_reducegather.c new file mode 100644 index 0000000..11014c7 --- /dev/null +++ b/vclib/rindow_matlib_d_reducegather.c @@ -0,0 +1,48 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_reducegather not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_d_reducegather)( /* rindow_matlib_d_reducegather */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* m */, + int32_t /* n */, + int32_t /* numClass */, + int32_t /* dtype */, + void * /* x */, + double * /* a */, + double * /* b */ +); +static PFNrindow_matlib_d_reducegather _g_rindow_matlib_d_reducegather = NULL; +int32_t rindow_matlib_d_reducegather( + int32_t reverse, + int32_t addMode, + int32_t m, + int32_t n, + int32_t numClass, + int32_t dtype, + void * x, + double * a, + double * b +) +{ + if(_g_rindow_matlib_d_reducegather==NULL) { + _g_rindow_matlib_d_reducegather = rindow_load_rindowmatlib_func("rindow_matlib_d_reducegather"); + if(_g_rindow_matlib_d_reducegather==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_d_reducegather( + reverse, + addMode, + m, + n, + numClass, + dtype, + x, + a, + b + ); +} diff --git a/vclib/rindow_matlib_d_reducemax.c b/vclib/rindow_matlib_d_reducemax.c new file mode 100644 index 0000000..658d667 --- /dev/null +++ b/vclib/rindow_matlib_d_reducemax.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_reducemax not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_reducemax)( /* rindow_matlib_d_reducemax */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + double * /* a */, + double * /* b */ +); +static PFNrindow_matlib_d_reducemax _g_rindow_matlib_d_reducemax = NULL; +void rindow_matlib_d_reducemax( + int32_t m, + int32_t n, + int32_t k, + double * a, + double * b +) +{ + if(_g_rindow_matlib_d_reducemax==NULL) { + _g_rindow_matlib_d_reducemax = rindow_load_rindowmatlib_func("rindow_matlib_d_reducemax"); + if(_g_rindow_matlib_d_reducemax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_reducemax( + m, + n, + k, + a, + b + ); +} diff --git a/vclib/rindow_matlib_d_reducesum.c b/vclib/rindow_matlib_d_reducesum.c new file mode 100644 index 0000000..1e44a31 --- /dev/null +++ b/vclib/rindow_matlib_d_reducesum.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_reducesum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_reducesum)( /* rindow_matlib_d_reducesum */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + double * /* a */, + double * /* b */ +); +static PFNrindow_matlib_d_reducesum _g_rindow_matlib_d_reducesum = NULL; +void rindow_matlib_d_reducesum( + int32_t m, + int32_t n, + int32_t k, + double * a, + double * b +) +{ + if(_g_rindow_matlib_d_reducesum==NULL) { + _g_rindow_matlib_d_reducesum = rindow_load_rindowmatlib_func("rindow_matlib_d_reducesum"); + if(_g_rindow_matlib_d_reducesum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_reducesum( + m, + n, + k, + a, + b + ); +} diff --git a/vclib/rindow_matlib_d_repeat.c b/vclib/rindow_matlib_d_repeat.c new file mode 100644 index 0000000..0df66bd --- /dev/null +++ b/vclib/rindow_matlib_d_repeat.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_repeat not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_repeat)( /* rindow_matlib_d_repeat */ + int32_t /* m */, + int32_t /* k */, + int32_t /* repeats */, + double * /* a */, + double * /* b */ +); +static PFNrindow_matlib_d_repeat _g_rindow_matlib_d_repeat = NULL; +void rindow_matlib_d_repeat( + int32_t m, + int32_t k, + int32_t repeats, + double * a, + double * b +) +{ + if(_g_rindow_matlib_d_repeat==NULL) { + _g_rindow_matlib_d_repeat = rindow_load_rindowmatlib_func("rindow_matlib_d_repeat"); + if(_g_rindow_matlib_d_repeat==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_repeat( + m, + k, + repeats, + a, + b + ); +} diff --git a/vclib/rindow_matlib_d_rsqrt.c b/vclib/rindow_matlib_d_rsqrt.c new file mode 100644 index 0000000..e848c98 --- /dev/null +++ b/vclib/rindow_matlib_d_rsqrt.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_rsqrt not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_rsqrt)( /* rindow_matlib_d_rsqrt */ + int32_t /* n */, + double /* alpha */, + double * /* x */, + int32_t /* incX */, + double /* beta */ +); +static PFNrindow_matlib_d_rsqrt _g_rindow_matlib_d_rsqrt = NULL; +void rindow_matlib_d_rsqrt( + int32_t n, + double alpha, + double * x, + int32_t incX, + double beta +) +{ + if(_g_rindow_matlib_d_rsqrt==NULL) { + _g_rindow_matlib_d_rsqrt = rindow_load_rindowmatlib_func("rindow_matlib_d_rsqrt"); + if(_g_rindow_matlib_d_rsqrt==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_rsqrt( + n, + alpha, + x, + incX, + beta + ); +} diff --git a/vclib/rindow_matlib_d_searchsorted.c b/vclib/rindow_matlib_d_searchsorted.c new file mode 100644 index 0000000..e37098b --- /dev/null +++ b/vclib/rindow_matlib_d_searchsorted.c @@ -0,0 +1,51 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_searchsorted not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_searchsorted)( /* rindow_matlib_d_searchsorted */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */, + double * /* x */, + int32_t /* incX */, + int32_t /* right */, + int32_t /* dtype */, + void * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_d_searchsorted _g_rindow_matlib_d_searchsorted = NULL; +void rindow_matlib_d_searchsorted( + int32_t m, + int32_t n, + double * a, + int32_t ldA, + double * x, + int32_t incX, + int32_t right, + int32_t dtype, + void * y, + int32_t incY +) +{ + if(_g_rindow_matlib_d_searchsorted==NULL) { + _g_rindow_matlib_d_searchsorted = rindow_load_rindowmatlib_func("rindow_matlib_d_searchsorted"); + if(_g_rindow_matlib_d_searchsorted==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_searchsorted( + m, + n, + a, + ldA, + x, + incX, + right, + dtype, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_d_sin.c b/vclib/rindow_matlib_d_sin.c new file mode 100644 index 0000000..aafa49b --- /dev/null +++ b/vclib/rindow_matlib_d_sin.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_sin not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_sin)( /* rindow_matlib_d_sin */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_sin _g_rindow_matlib_d_sin = NULL; +void rindow_matlib_d_sin( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_sin==NULL) { + _g_rindow_matlib_d_sin = rindow_load_rindowmatlib_func("rindow_matlib_d_sin"); + if(_g_rindow_matlib_d_sin==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_sin( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_slice.c b/vclib/rindow_matlib_d_slice.c new file mode 100644 index 0000000..9aea451 --- /dev/null +++ b/vclib/rindow_matlib_d_slice.c @@ -0,0 +1,69 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_slice not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_slice)( /* rindow_matlib_d_slice */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + int32_t /* size */, + double * /* a */, + int32_t /* incA */, + double * /* y */, + int32_t /* incY */, + int32_t /* startAxis0 */, + int32_t /* sizeAxis0 */, + int32_t /* startAxis1 */, + int32_t /* sizeAxis1 */, + int32_t /* startAxis2 */, + int32_t /* sizeAxis2 */ +); +static PFNrindow_matlib_d_slice _g_rindow_matlib_d_slice = NULL; +void rindow_matlib_d_slice( + int32_t reverse, + int32_t addMode, + int32_t m, + int32_t n, + int32_t k, + int32_t size, + double * a, + int32_t incA, + double * y, + int32_t incY, + int32_t startAxis0, + int32_t sizeAxis0, + int32_t startAxis1, + int32_t sizeAxis1, + int32_t startAxis2, + int32_t sizeAxis2 +) +{ + if(_g_rindow_matlib_d_slice==NULL) { + _g_rindow_matlib_d_slice = rindow_load_rindowmatlib_func("rindow_matlib_d_slice"); + if(_g_rindow_matlib_d_slice==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_slice( + reverse, + addMode, + m, + n, + k, + size, + a, + incA, + y, + incY, + startAxis0, + sizeAxis0, + startAxis1, + sizeAxis1, + startAxis2, + sizeAxis2 + ); +} diff --git a/vclib/rindow_matlib_d_softmax.c b/vclib/rindow_matlib_d_softmax.c new file mode 100644 index 0000000..ed5b7d5 --- /dev/null +++ b/vclib/rindow_matlib_d_softmax.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_softmax not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_softmax)( /* rindow_matlib_d_softmax */ + int32_t /* m */, + int32_t /* n */, + double * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_d_softmax _g_rindow_matlib_d_softmax = NULL; +void rindow_matlib_d_softmax( + int32_t m, + int32_t n, + double * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_d_softmax==NULL) { + _g_rindow_matlib_d_softmax = rindow_load_rindowmatlib_func("rindow_matlib_d_softmax"); + if(_g_rindow_matlib_d_softmax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_softmax( + m, + n, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_d_sqrt.c b/vclib/rindow_matlib_d_sqrt.c new file mode 100644 index 0000000..435a08c --- /dev/null +++ b/vclib/rindow_matlib_d_sqrt.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_sqrt not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_sqrt)( /* rindow_matlib_d_sqrt */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_sqrt _g_rindow_matlib_d_sqrt = NULL; +void rindow_matlib_d_sqrt( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_sqrt==NULL) { + _g_rindow_matlib_d_sqrt = rindow_load_rindowmatlib_func("rindow_matlib_d_sqrt"); + if(_g_rindow_matlib_d_sqrt==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_sqrt( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_square.c b/vclib/rindow_matlib_d_square.c new file mode 100644 index 0000000..f7ad213 --- /dev/null +++ b/vclib/rindow_matlib_d_square.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_square not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_square)( /* rindow_matlib_d_square */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_square _g_rindow_matlib_d_square = NULL; +void rindow_matlib_d_square( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_square==NULL) { + _g_rindow_matlib_d_square = rindow_load_rindowmatlib_func("rindow_matlib_d_square"); + if(_g_rindow_matlib_d_square==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_square( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_sum.c b/vclib/rindow_matlib_d_sum.c new file mode 100644 index 0000000..783679e --- /dev/null +++ b/vclib/rindow_matlib_d_sum.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_sum not found\n"; +typedef double (CALLBACK* PFNrindow_matlib_d_sum)( /* rindow_matlib_d_sum */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_sum _g_rindow_matlib_d_sum = NULL; +double rindow_matlib_d_sum( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_sum==NULL) { + _g_rindow_matlib_d_sum = rindow_load_rindowmatlib_func("rindow_matlib_d_sum"); + if(_g_rindow_matlib_d_sum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_d_sum( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_tan.c b/vclib/rindow_matlib_d_tan.c new file mode 100644 index 0000000..6c9fafb --- /dev/null +++ b/vclib/rindow_matlib_d_tan.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_tan not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_tan)( /* rindow_matlib_d_tan */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_tan _g_rindow_matlib_d_tan = NULL; +void rindow_matlib_d_tan( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_tan==NULL) { + _g_rindow_matlib_d_tan = rindow_load_rindowmatlib_func("rindow_matlib_d_tan"); + if(_g_rindow_matlib_d_tan==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_tan( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_tanh.c b/vclib/rindow_matlib_d_tanh.c new file mode 100644 index 0000000..f59df40 --- /dev/null +++ b/vclib/rindow_matlib_d_tanh.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_tanh not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_tanh)( /* rindow_matlib_d_tanh */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_tanh _g_rindow_matlib_d_tanh = NULL; +void rindow_matlib_d_tanh( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_tanh==NULL) { + _g_rindow_matlib_d_tanh = rindow_load_rindowmatlib_func("rindow_matlib_d_tanh"); + if(_g_rindow_matlib_d_tanh==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_tanh( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_d_topk.c b/vclib/rindow_matlib_d_topk.c new file mode 100644 index 0000000..7c461a1 --- /dev/null +++ b/vclib/rindow_matlib_d_topk.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_topk not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_topk)( /* rindow_matlib_d_topk */ + int32_t /* m */, + int32_t /* n */, + const double * /* input */, + int32_t /* k */, + int32_t /* sorted */, + double * /* values */, + int32_t * /* indices */ +); +static PFNrindow_matlib_d_topk _g_rindow_matlib_d_topk = NULL; +void rindow_matlib_d_topk( + int32_t m, + int32_t n, + const double * input, + int32_t k, + int32_t sorted, + double * values, + int32_t * indices +) +{ + if(_g_rindow_matlib_d_topk==NULL) { + _g_rindow_matlib_d_topk = rindow_load_rindowmatlib_func("rindow_matlib_d_topk"); + if(_g_rindow_matlib_d_topk==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_topk( + m, + n, + input, + k, + sorted, + values, + indices + ); +} diff --git a/vclib/rindow_matlib_d_transpose.c b/vclib/rindow_matlib_d_transpose.c new file mode 100644 index 0000000..7acb1b6 --- /dev/null +++ b/vclib/rindow_matlib_d_transpose.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_transpose not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_d_transpose)( /* rindow_matlib_d_transpose */ + int32_t /* ndim */, + int32_t * /* shape */, + int32_t * /* perm */, + double * /* a */, + double * /* b */ +); +static PFNrindow_matlib_d_transpose _g_rindow_matlib_d_transpose = NULL; +int32_t rindow_matlib_d_transpose( + int32_t ndim, + int32_t * shape, + int32_t * perm, + double * a, + double * b +) +{ + if(_g_rindow_matlib_d_transpose==NULL) { + _g_rindow_matlib_d_transpose = rindow_load_rindowmatlib_func("rindow_matlib_d_transpose"); + if(_g_rindow_matlib_d_transpose==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_d_transpose( + ndim, + shape, + perm, + a, + b + ); +} diff --git a/vclib/rindow_matlib_d_zeros.c b/vclib/rindow_matlib_d_zeros.c new file mode 100644 index 0000000..fab50ef --- /dev/null +++ b/vclib/rindow_matlib_d_zeros.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_d_zeros not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_d_zeros)( /* rindow_matlib_d_zeros */ + int32_t /* n */, + double * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_d_zeros _g_rindow_matlib_d_zeros = NULL; +void rindow_matlib_d_zeros( + int32_t n, + double * x, + int32_t incX +) +{ + if(_g_rindow_matlib_d_zeros==NULL) { + _g_rindow_matlib_d_zeros = rindow_load_rindowmatlib_func("rindow_matlib_d_zeros"); + if(_g_rindow_matlib_d_zeros==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_d_zeros( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_fill.c b/vclib/rindow_matlib_fill.c new file mode 100644 index 0000000..d1ca47d --- /dev/null +++ b/vclib/rindow_matlib_fill.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_fill not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_fill)( /* rindow_matlib_fill */ + int32_t /* dtype */, + int32_t /* n */, + void * /* value */, + void * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_fill _g_rindow_matlib_fill = NULL; +void rindow_matlib_fill( + int32_t dtype, + int32_t n, + void * value, + void * x, + int32_t incX +) +{ + if(_g_rindow_matlib_fill==NULL) { + _g_rindow_matlib_fill = rindow_load_rindowmatlib_func("rindow_matlib_fill"); + if(_g_rindow_matlib_fill==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_fill( + dtype, + n, + value, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_i8_imagecopy.c b/vclib/rindow_matlib_i8_imagecopy.c new file mode 100644 index 0000000..212f4fb --- /dev/null +++ b/vclib/rindow_matlib_i8_imagecopy.c @@ -0,0 +1,54 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i8_imagecopy not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i8_imagecopy)( /* rindow_matlib_i8_imagecopy */ + int32_t /* height */, + int32_t /* width */, + int32_t /* channels */, + uint8_t * /* a */, + uint8_t * /* b */, + int32_t /* channelsFirst */, + int32_t /* heightShift */, + int32_t /* widthShift */, + int32_t /* verticalFlip */, + int32_t /* horizontalFlip */, + int32_t /* rgbFlip */ +); +static PFNrindow_matlib_i8_imagecopy _g_rindow_matlib_i8_imagecopy = NULL; +void rindow_matlib_i8_imagecopy( + int32_t height, + int32_t width, + int32_t channels, + uint8_t * a, + uint8_t * b, + int32_t channelsFirst, + int32_t heightShift, + int32_t widthShift, + int32_t verticalFlip, + int32_t horizontalFlip, + int32_t rgbFlip +) +{ + if(_g_rindow_matlib_i8_imagecopy==NULL) { + _g_rindow_matlib_i8_imagecopy = rindow_load_rindowmatlib_func("rindow_matlib_i8_imagecopy"); + if(_g_rindow_matlib_i8_imagecopy==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i8_imagecopy( + height, + width, + channels, + a, + b, + channelsFirst, + heightShift, + widthShift, + verticalFlip, + horizontalFlip, + rgbFlip + ); +} diff --git a/vclib/rindow_matlib_i_equal.c b/vclib/rindow_matlib_i_equal.c new file mode 100644 index 0000000..b62a99d --- /dev/null +++ b/vclib/rindow_matlib_i_equal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_equal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i_equal)( /* rindow_matlib_i_equal */ + int32_t /* dtype */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */, + void * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_i_equal _g_rindow_matlib_i_equal = NULL; +void rindow_matlib_i_equal( + int32_t dtype, + int32_t n, + void * x, + int32_t incX, + void * y, + int32_t incY +) +{ + if(_g_rindow_matlib_i_equal==NULL) { + _g_rindow_matlib_i_equal = rindow_load_rindowmatlib_func("rindow_matlib_i_equal"); + if(_g_rindow_matlib_i_equal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i_equal( + dtype, + n, + x, + incX, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_i_gather.c b/vclib/rindow_matlib_i_gather.c new file mode 100644 index 0000000..f05bbbe --- /dev/null +++ b/vclib/rindow_matlib_i_gather.c @@ -0,0 +1,51 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_gather not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_i_gather)( /* rindow_matlib_i_gather */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* n */, + int32_t /* k */, + int32_t /* numClass */, + int32_t /* dtype */, + void * /* x */, + int32_t /* data_dtype */, + void * /* a */, + void * /* b */ +); +static PFNrindow_matlib_i_gather _g_rindow_matlib_i_gather = NULL; +int32_t rindow_matlib_i_gather( + int32_t reverse, + int32_t addMode, + int32_t n, + int32_t k, + int32_t numClass, + int32_t dtype, + void * x, + int32_t data_dtype, + void * a, + void * b +) +{ + if(_g_rindow_matlib_i_gather==NULL) { + _g_rindow_matlib_i_gather = rindow_load_rindowmatlib_func("rindow_matlib_i_gather"); + if(_g_rindow_matlib_i_gather==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_i_gather( + reverse, + addMode, + n, + k, + numClass, + dtype, + x, + data_dtype, + a, + b + ); +} diff --git a/vclib/rindow_matlib_i_imax.c b/vclib/rindow_matlib_i_imax.c new file mode 100644 index 0000000..2e7f6d9 --- /dev/null +++ b/vclib/rindow_matlib_i_imax.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_imax not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_i_imax)( /* rindow_matlib_i_imax */ + int32_t /* dtype */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_i_imax _g_rindow_matlib_i_imax = NULL; +int32_t rindow_matlib_i_imax( + int32_t dtype, + int32_t n, + void * x, + int32_t incX +) +{ + if(_g_rindow_matlib_i_imax==NULL) { + _g_rindow_matlib_i_imax = rindow_load_rindowmatlib_func("rindow_matlib_i_imax"); + if(_g_rindow_matlib_i_imax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_i_imax( + dtype, + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_i_imin.c b/vclib/rindow_matlib_i_imin.c new file mode 100644 index 0000000..b9620d1 --- /dev/null +++ b/vclib/rindow_matlib_i_imin.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_imin not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_i_imin)( /* rindow_matlib_i_imin */ + int32_t /* dtype */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_i_imin _g_rindow_matlib_i_imin = NULL; +int32_t rindow_matlib_i_imin( + int32_t dtype, + int32_t n, + void * x, + int32_t incX +) +{ + if(_g_rindow_matlib_i_imin==NULL) { + _g_rindow_matlib_i_imin = rindow_load_rindowmatlib_func("rindow_matlib_i_imin"); + if(_g_rindow_matlib_i_imin==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_i_imin( + dtype, + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_i_not.c b/vclib/rindow_matlib_i_not.c new file mode 100644 index 0000000..7b03284 --- /dev/null +++ b/vclib/rindow_matlib_i_not.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_not not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i_not)( /* rindow_matlib_i_not */ + int32_t /* dtype */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_i_not _g_rindow_matlib_i_not = NULL; +void rindow_matlib_i_not( + int32_t dtype, + int32_t n, + void * x, + int32_t incX +) +{ + if(_g_rindow_matlib_i_not==NULL) { + _g_rindow_matlib_i_not = rindow_load_rindowmatlib_func("rindow_matlib_i_not"); + if(_g_rindow_matlib_i_not==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i_not( + dtype, + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_i_notequal.c b/vclib/rindow_matlib_i_notequal.c new file mode 100644 index 0000000..b88230c --- /dev/null +++ b/vclib/rindow_matlib_i_notequal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_notequal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i_notequal)( /* rindow_matlib_i_notequal */ + int32_t /* dtype */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */, + void * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_i_notequal _g_rindow_matlib_i_notequal = NULL; +void rindow_matlib_i_notequal( + int32_t dtype, + int32_t n, + void * x, + int32_t incX, + void * y, + int32_t incY +) +{ + if(_g_rindow_matlib_i_notequal==NULL) { + _g_rindow_matlib_i_notequal = rindow_load_rindowmatlib_func("rindow_matlib_i_notequal"); + if(_g_rindow_matlib_i_notequal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i_notequal( + dtype, + n, + x, + incX, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_i_randomsequence.c b/vclib/rindow_matlib_i_randomsequence.c new file mode 100644 index 0000000..cf65561 --- /dev/null +++ b/vclib/rindow_matlib_i_randomsequence.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_randomsequence not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i_randomsequence)( /* rindow_matlib_i_randomsequence */ + int32_t /* n */, + int32_t /* size */, + int32_t /* dtype */, + void * /* x */, + int32_t /* incX */, + int32_t /* seed */ +); +static PFNrindow_matlib_i_randomsequence _g_rindow_matlib_i_randomsequence = NULL; +void rindow_matlib_i_randomsequence( + int32_t n, + int32_t size, + int32_t dtype, + void * x, + int32_t incX, + int32_t seed +) +{ + if(_g_rindow_matlib_i_randomsequence==NULL) { + _g_rindow_matlib_i_randomsequence = rindow_load_rindowmatlib_func("rindow_matlib_i_randomsequence"); + if(_g_rindow_matlib_i_randomsequence==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i_randomsequence( + n, + size, + dtype, + x, + incX, + seed + ); +} diff --git a/vclib/rindow_matlib_i_randomuniform.c b/vclib/rindow_matlib_i_randomuniform.c new file mode 100644 index 0000000..2dc9cef --- /dev/null +++ b/vclib/rindow_matlib_i_randomuniform.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_randomuniform not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i_randomuniform)( /* rindow_matlib_i_randomuniform */ + int32_t /* n */, + int32_t /* dtype */, + void * /* x */, + int32_t /* incX */, + int32_t /* low */, + int32_t /* high */, + int32_t /* seed */ +); +static PFNrindow_matlib_i_randomuniform _g_rindow_matlib_i_randomuniform = NULL; +void rindow_matlib_i_randomuniform( + int32_t n, + int32_t dtype, + void * x, + int32_t incX, + int32_t low, + int32_t high, + int32_t seed +) +{ + if(_g_rindow_matlib_i_randomuniform==NULL) { + _g_rindow_matlib_i_randomuniform = rindow_load_rindowmatlib_func("rindow_matlib_i_randomuniform"); + if(_g_rindow_matlib_i_randomuniform==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i_randomuniform( + n, + dtype, + x, + incX, + low, + high, + seed + ); +} diff --git a/vclib/rindow_matlib_i_reducegather.c b/vclib/rindow_matlib_i_reducegather.c new file mode 100644 index 0000000..181f84b --- /dev/null +++ b/vclib/rindow_matlib_i_reducegather.c @@ -0,0 +1,51 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_reducegather not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_i_reducegather)( /* rindow_matlib_i_reducegather */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* m */, + int32_t /* n */, + int32_t /* numClass */, + int32_t /* dtype */, + void * /* x */, + int32_t /* data_dtype */, + void * /* a */, + void * /* b */ +); +static PFNrindow_matlib_i_reducegather _g_rindow_matlib_i_reducegather = NULL; +int32_t rindow_matlib_i_reducegather( + int32_t reverse, + int32_t addMode, + int32_t m, + int32_t n, + int32_t numClass, + int32_t dtype, + void * x, + int32_t data_dtype, + void * a, + void * b +) +{ + if(_g_rindow_matlib_i_reducegather==NULL) { + _g_rindow_matlib_i_reducegather = rindow_load_rindowmatlib_func("rindow_matlib_i_reducegather"); + if(_g_rindow_matlib_i_reducegather==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_i_reducegather( + reverse, + addMode, + m, + n, + numClass, + dtype, + x, + data_dtype, + a, + b + ); +} diff --git a/vclib/rindow_matlib_i_slice.c b/vclib/rindow_matlib_i_slice.c new file mode 100644 index 0000000..cf77d45 --- /dev/null +++ b/vclib/rindow_matlib_i_slice.c @@ -0,0 +1,72 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_slice not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i_slice)( /* rindow_matlib_i_slice */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + int32_t /* size */, + int32_t /* dtype */, + void * /* a */, + int32_t /* incA */, + void * /* y */, + int32_t /* incY */, + int32_t /* startAxis0 */, + int32_t /* sizeAxis0 */, + int32_t /* startAxis1 */, + int32_t /* sizeAxis1 */, + int32_t /* startAxis2 */, + int32_t /* sizeAxis2 */ +); +static PFNrindow_matlib_i_slice _g_rindow_matlib_i_slice = NULL; +void rindow_matlib_i_slice( + int32_t reverse, + int32_t addMode, + int32_t m, + int32_t n, + int32_t k, + int32_t size, + int32_t dtype, + void * a, + int32_t incA, + void * y, + int32_t incY, + int32_t startAxis0, + int32_t sizeAxis0, + int32_t startAxis1, + int32_t sizeAxis1, + int32_t startAxis2, + int32_t sizeAxis2 +) +{ + if(_g_rindow_matlib_i_slice==NULL) { + _g_rindow_matlib_i_slice = rindow_load_rindowmatlib_func("rindow_matlib_i_slice"); + if(_g_rindow_matlib_i_slice==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i_slice( + reverse, + addMode, + m, + n, + k, + size, + dtype, + a, + incA, + y, + incY, + startAxis0, + sizeAxis0, + startAxis1, + sizeAxis1, + startAxis2, + sizeAxis2 + ); +} diff --git a/vclib/rindow_matlib_i_sum.c b/vclib/rindow_matlib_i_sum.c new file mode 100644 index 0000000..91d40cd --- /dev/null +++ b/vclib/rindow_matlib_i_sum.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_sum not found\n"; +typedef int64_t (CALLBACK* PFNrindow_matlib_i_sum)( /* rindow_matlib_i_sum */ + int32_t /* dtype */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_i_sum _g_rindow_matlib_i_sum = NULL; +int64_t rindow_matlib_i_sum( + int32_t dtype, + int32_t n, + void * x, + int32_t incX +) +{ + if(_g_rindow_matlib_i_sum==NULL) { + _g_rindow_matlib_i_sum = rindow_load_rindowmatlib_func("rindow_matlib_i_sum"); + if(_g_rindow_matlib_i_sum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_i_sum( + dtype, + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_i_transpose.c b/vclib/rindow_matlib_i_transpose.c new file mode 100644 index 0000000..c23430e --- /dev/null +++ b/vclib/rindow_matlib_i_transpose.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_transpose not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_i_transpose)( /* rindow_matlib_i_transpose */ + int32_t /* dtype */, + int32_t /* ndim */, + int32_t * /* shape */, + int32_t * /* perm */, + void * /* a */, + void * /* b */ +); +static PFNrindow_matlib_i_transpose _g_rindow_matlib_i_transpose = NULL; +int32_t rindow_matlib_i_transpose( + int32_t dtype, + int32_t ndim, + int32_t * shape, + int32_t * perm, + void * a, + void * b +) +{ + if(_g_rindow_matlib_i_transpose==NULL) { + _g_rindow_matlib_i_transpose = rindow_load_rindowmatlib_func("rindow_matlib_i_transpose"); + if(_g_rindow_matlib_i_transpose==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_i_transpose( + dtype, + ndim, + shape, + perm, + a, + b + ); +} diff --git a/vclib/rindow_matlib_i_zeros.c b/vclib/rindow_matlib_i_zeros.c new file mode 100644 index 0000000..69abe7a --- /dev/null +++ b/vclib/rindow_matlib_i_zeros.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_i_zeros not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_i_zeros)( /* rindow_matlib_i_zeros */ + int32_t /* dtype */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_i_zeros _g_rindow_matlib_i_zeros = NULL; +void rindow_matlib_i_zeros( + int32_t dtype, + int32_t n, + void * x, + int32_t incX +) +{ + if(_g_rindow_matlib_i_zeros==NULL) { + _g_rindow_matlib_i_zeros = rindow_load_rindowmatlib_func("rindow_matlib_i_zeros"); + if(_g_rindow_matlib_i_zeros==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_i_zeros( + dtype, + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_im2col1d.c b/vclib/rindow_matlib_im2col1d.c new file mode 100644 index 0000000..9a90d6a --- /dev/null +++ b/vclib/rindow_matlib_im2col1d.c @@ -0,0 +1,66 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_im2col1d not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_im2col1d)( /* rindow_matlib_im2col1d */ + int32_t /* dtype */, + int32_t /* reverse */, + void * /* images_data */, + int32_t /* images_size */, + int32_t /* batches */, + int32_t /* im_w */, + int32_t /* channels */, + int32_t /* filter_w */, + int32_t /* stride_w */, + int32_t /* padding */, + int32_t /* channels_first */, + int32_t /* dilation_w */, + int32_t /* cols_channels_first */, + void * /* cols_data */, + int32_t /* cols_size */ +); +static PFNrindow_matlib_im2col1d _g_rindow_matlib_im2col1d = NULL; +int32_t rindow_matlib_im2col1d( + int32_t dtype, + int32_t reverse, + void * images_data, + int32_t images_size, + int32_t batches, + int32_t im_w, + int32_t channels, + int32_t filter_w, + int32_t stride_w, + int32_t padding, + int32_t channels_first, + int32_t dilation_w, + int32_t cols_channels_first, + void * cols_data, + int32_t cols_size +) +{ + if(_g_rindow_matlib_im2col1d==NULL) { + _g_rindow_matlib_im2col1d = rindow_load_rindowmatlib_func("rindow_matlib_im2col1d"); + if(_g_rindow_matlib_im2col1d==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_im2col1d( + dtype, + reverse, + images_data, + images_size, + batches, + im_w, + channels, + filter_w, + stride_w, + padding, + channels_first, + dilation_w, + cols_channels_first, + cols_data, + cols_size + ); +} diff --git a/vclib/rindow_matlib_im2col2d.c b/vclib/rindow_matlib_im2col2d.c new file mode 100644 index 0000000..8fabda7 --- /dev/null +++ b/vclib/rindow_matlib_im2col2d.c @@ -0,0 +1,78 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_im2col2d not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_im2col2d)( /* rindow_matlib_im2col2d */ + int32_t /* dtype */, + int32_t /* reverse */, + void * /* images_data */, + int32_t /* images_size */, + int32_t /* batches */, + int32_t /* im_h */, + int32_t /* im_w */, + int32_t /* channels */, + int32_t /* filter_h */, + int32_t /* filter_w */, + int32_t /* stride_h */, + int32_t /* stride_w */, + int32_t /* padding */, + int32_t /* channels_first */, + int32_t /* dilation_h */, + int32_t /* dilation_w */, + int32_t /* cols_channels_first */, + void * /* cols_data */, + int32_t /* cols_size */ +); +static PFNrindow_matlib_im2col2d _g_rindow_matlib_im2col2d = NULL; +int32_t rindow_matlib_im2col2d( + int32_t dtype, + int32_t reverse, + void * images_data, + int32_t images_size, + int32_t batches, + int32_t im_h, + int32_t im_w, + int32_t channels, + int32_t filter_h, + int32_t filter_w, + int32_t stride_h, + int32_t stride_w, + int32_t padding, + int32_t channels_first, + int32_t dilation_h, + int32_t dilation_w, + int32_t cols_channels_first, + void * cols_data, + int32_t cols_size +) +{ + if(_g_rindow_matlib_im2col2d==NULL) { + _g_rindow_matlib_im2col2d = rindow_load_rindowmatlib_func("rindow_matlib_im2col2d"); + if(_g_rindow_matlib_im2col2d==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_im2col2d( + dtype, + reverse, + images_data, + images_size, + batches, + im_h, + im_w, + channels, + filter_h, + filter_w, + stride_h, + stride_w, + padding, + channels_first, + dilation_h, + dilation_w, + cols_channels_first, + cols_data, + cols_size + ); +} diff --git a/vclib/rindow_matlib_im2col3d.c b/vclib/rindow_matlib_im2col3d.c new file mode 100644 index 0000000..cad6ee5 --- /dev/null +++ b/vclib/rindow_matlib_im2col3d.c @@ -0,0 +1,90 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_im2col3d not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_im2col3d)( /* rindow_matlib_im2col3d */ + int32_t /* dtype */, + int32_t /* reverse */, + void * /* images_data */, + int32_t /* images_size */, + int32_t /* batches */, + int32_t /* im_d */, + int32_t /* im_h */, + int32_t /* im_w */, + int32_t /* channels */, + int32_t /* filter_d */, + int32_t /* filter_h */, + int32_t /* filter_w */, + int32_t /* stride_d */, + int32_t /* stride_h */, + int32_t /* stride_w */, + int32_t /* padding */, + int32_t /* channels_first */, + int32_t /* dilation_d */, + int32_t /* dilation_h */, + int32_t /* dilation_w */, + int32_t /* cols_channels_first */, + void * /* cols_data */, + int32_t /* cols_size */ +); +static PFNrindow_matlib_im2col3d _g_rindow_matlib_im2col3d = NULL; +int32_t rindow_matlib_im2col3d( + int32_t dtype, + int32_t reverse, + void * images_data, + int32_t images_size, + int32_t batches, + int32_t im_d, + int32_t im_h, + int32_t im_w, + int32_t channels, + int32_t filter_d, + int32_t filter_h, + int32_t filter_w, + int32_t stride_d, + int32_t stride_h, + int32_t stride_w, + int32_t padding, + int32_t channels_first, + int32_t dilation_d, + int32_t dilation_h, + int32_t dilation_w, + int32_t cols_channels_first, + void * cols_data, + int32_t cols_size +) +{ + if(_g_rindow_matlib_im2col3d==NULL) { + _g_rindow_matlib_im2col3d = rindow_load_rindowmatlib_func("rindow_matlib_im2col3d"); + if(_g_rindow_matlib_im2col3d==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_im2col3d( + dtype, + reverse, + images_data, + images_size, + batches, + im_d, + im_h, + im_w, + channels, + filter_d, + filter_h, + filter_w, + stride_d, + stride_h, + stride_w, + padding, + channels_first, + dilation_d, + dilation_h, + dilation_w, + cols_channels_first, + cols_data, + cols_size + ); +} diff --git a/vclib/rindow_matlib_s_add.c b/vclib/rindow_matlib_s_add.c new file mode 100644 index 0000000..c952b18 --- /dev/null +++ b/vclib/rindow_matlib_s_add.c @@ -0,0 +1,45 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_add not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_add)( /* rindow_matlib_s_add */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + float /* alpha */, + float * /* x */, + int32_t /* incX */, + float * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_s_add _g_rindow_matlib_s_add = NULL; +void rindow_matlib_s_add( + int32_t trans, + int32_t m, + int32_t n, + float alpha, + float * x, + int32_t incX, + float * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_s_add==NULL) { + _g_rindow_matlib_s_add = rindow_load_rindowmatlib_func("rindow_matlib_s_add"); + if(_g_rindow_matlib_s_add==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_add( + trans, + m, + n, + alpha, + x, + incX, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_s_bandpart.c b/vclib/rindow_matlib_s_bandpart.c new file mode 100644 index 0000000..a1dedf8 --- /dev/null +++ b/vclib/rindow_matlib_s_bandpart.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_bandpart not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_bandpart)( /* rindow_matlib_s_bandpart */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + float * /* a */, + int32_t /* lower */, + int32_t /* upper */ +); +static PFNrindow_matlib_s_bandpart _g_rindow_matlib_s_bandpart = NULL; +void rindow_matlib_s_bandpart( + int32_t m, + int32_t n, + int32_t k, + float * a, + int32_t lower, + int32_t upper +) +{ + if(_g_rindow_matlib_s_bandpart==NULL) { + _g_rindow_matlib_s_bandpart = rindow_load_rindowmatlib_func("rindow_matlib_s_bandpart"); + if(_g_rindow_matlib_s_bandpart==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_bandpart( + m, + n, + k, + a, + lower, + upper + ); +} diff --git a/vclib/rindow_matlib_s_cos.c b/vclib/rindow_matlib_s_cos.c new file mode 100644 index 0000000..8b0746c --- /dev/null +++ b/vclib/rindow_matlib_s_cos.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_cos not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_cos)( /* rindow_matlib_s_cos */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_cos _g_rindow_matlib_s_cos = NULL; +void rindow_matlib_s_cos( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_cos==NULL) { + _g_rindow_matlib_s_cos = rindow_load_rindowmatlib_func("rindow_matlib_s_cos"); + if(_g_rindow_matlib_s_cos==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_cos( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_cumsum.c b/vclib/rindow_matlib_s_cumsum.c new file mode 100644 index 0000000..5525b10 --- /dev/null +++ b/vclib/rindow_matlib_s_cumsum.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_cumsum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_cumsum)( /* rindow_matlib_s_cumsum */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + int32_t /* exclusive */, + int32_t /* reverse */, + float * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_s_cumsum _g_rindow_matlib_s_cumsum = NULL; +void rindow_matlib_s_cumsum( + int32_t n, + float * x, + int32_t incX, + int32_t exclusive, + int32_t reverse, + float * y, + int32_t incY +) +{ + if(_g_rindow_matlib_s_cumsum==NULL) { + _g_rindow_matlib_s_cumsum = rindow_load_rindowmatlib_func("rindow_matlib_s_cumsum"); + if(_g_rindow_matlib_s_cumsum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_cumsum( + n, + x, + incX, + exclusive, + reverse, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_s_duplicate.c b/vclib/rindow_matlib_s_duplicate.c new file mode 100644 index 0000000..b5a98d0 --- /dev/null +++ b/vclib/rindow_matlib_s_duplicate.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_duplicate not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_duplicate)( /* rindow_matlib_s_duplicate */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_s_duplicate _g_rindow_matlib_s_duplicate = NULL; +void rindow_matlib_s_duplicate( + int32_t trans, + int32_t m, + int32_t n, + float * x, + int32_t incX, + float * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_s_duplicate==NULL) { + _g_rindow_matlib_s_duplicate = rindow_load_rindowmatlib_func("rindow_matlib_s_duplicate"); + if(_g_rindow_matlib_s_duplicate==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_duplicate( + trans, + m, + n, + x, + incX, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_s_equal.c b/vclib/rindow_matlib_s_equal.c new file mode 100644 index 0000000..1a5da4b --- /dev/null +++ b/vclib/rindow_matlib_s_equal.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_equal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_equal)( /* rindow_matlib_s_equal */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_s_equal _g_rindow_matlib_s_equal = NULL; +void rindow_matlib_s_equal( + int32_t n, + float * x, + int32_t incX, + float * y, + int32_t incY +) +{ + if(_g_rindow_matlib_s_equal==NULL) { + _g_rindow_matlib_s_equal = rindow_load_rindowmatlib_func("rindow_matlib_s_equal"); + if(_g_rindow_matlib_s_equal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_equal( + n, + x, + incX, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_s_exp.c b/vclib/rindow_matlib_s_exp.c new file mode 100644 index 0000000..7a15a3e --- /dev/null +++ b/vclib/rindow_matlib_s_exp.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_exp not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_exp)( /* rindow_matlib_s_exp */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_exp _g_rindow_matlib_s_exp = NULL; +void rindow_matlib_s_exp( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_exp==NULL) { + _g_rindow_matlib_s_exp = rindow_load_rindowmatlib_func("rindow_matlib_s_exp"); + if(_g_rindow_matlib_s_exp==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_exp( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_gather.c b/vclib/rindow_matlib_s_gather.c new file mode 100644 index 0000000..ee380b7 --- /dev/null +++ b/vclib/rindow_matlib_s_gather.c @@ -0,0 +1,48 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_gather not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_s_gather)( /* rindow_matlib_s_gather */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* n */, + int32_t /* k */, + int32_t /* numClass */, + int32_t /* dtype */, + void * /* x */, + float * /* a */, + float * /* b */ +); +static PFNrindow_matlib_s_gather _g_rindow_matlib_s_gather = NULL; +int32_t rindow_matlib_s_gather( + int32_t reverse, + int32_t addMode, + int32_t n, + int32_t k, + int32_t numClass, + int32_t dtype, + void * x, + float * a, + float * b +) +{ + if(_g_rindow_matlib_s_gather==NULL) { + _g_rindow_matlib_s_gather = rindow_load_rindowmatlib_func("rindow_matlib_s_gather"); + if(_g_rindow_matlib_s_gather==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_s_gather( + reverse, + addMode, + n, + k, + numClass, + dtype, + x, + a, + b + ); +} diff --git a/vclib/rindow_matlib_s_greater.c b/vclib/rindow_matlib_s_greater.c new file mode 100644 index 0000000..e0b7e0b --- /dev/null +++ b/vclib/rindow_matlib_s_greater.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_greater not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_greater)( /* rindow_matlib_s_greater */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_greater _g_rindow_matlib_s_greater = NULL; +void rindow_matlib_s_greater( + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_greater==NULL) { + _g_rindow_matlib_s_greater = rindow_load_rindowmatlib_func("rindow_matlib_s_greater"); + if(_g_rindow_matlib_s_greater==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_greater( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_greater_equal.c b/vclib/rindow_matlib_s_greater_equal.c new file mode 100644 index 0000000..aaff0eb --- /dev/null +++ b/vclib/rindow_matlib_s_greater_equal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_greater_equal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_greater_equal)( /* rindow_matlib_s_greater_equal */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_greater_equal _g_rindow_matlib_s_greater_equal = NULL; +void rindow_matlib_s_greater_equal( + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_greater_equal==NULL) { + _g_rindow_matlib_s_greater_equal = rindow_load_rindowmatlib_func("rindow_matlib_s_greater_equal"); + if(_g_rindow_matlib_s_greater_equal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_greater_equal( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_imagecopy.c b/vclib/rindow_matlib_s_imagecopy.c new file mode 100644 index 0000000..a4fd0d3 --- /dev/null +++ b/vclib/rindow_matlib_s_imagecopy.c @@ -0,0 +1,54 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_imagecopy not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_imagecopy)( /* rindow_matlib_s_imagecopy */ + int32_t /* height */, + int32_t /* width */, + int32_t /* channels */, + float * /* a */, + float * /* b */, + int32_t /* channelsFirst */, + int32_t /* heightShift */, + int32_t /* widthShift */, + int32_t /* verticalFlip */, + int32_t /* horizontalFlip */, + int32_t /* rgbFlip */ +); +static PFNrindow_matlib_s_imagecopy _g_rindow_matlib_s_imagecopy = NULL; +void rindow_matlib_s_imagecopy( + int32_t height, + int32_t width, + int32_t channels, + float * a, + float * b, + int32_t channelsFirst, + int32_t heightShift, + int32_t widthShift, + int32_t verticalFlip, + int32_t horizontalFlip, + int32_t rgbFlip +) +{ + if(_g_rindow_matlib_s_imagecopy==NULL) { + _g_rindow_matlib_s_imagecopy = rindow_load_rindowmatlib_func("rindow_matlib_s_imagecopy"); + if(_g_rindow_matlib_s_imagecopy==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_imagecopy( + height, + width, + channels, + a, + b, + channelsFirst, + heightShift, + widthShift, + verticalFlip, + horizontalFlip, + rgbFlip + ); +} diff --git a/vclib/rindow_matlib_s_imax.c b/vclib/rindow_matlib_s_imax.c new file mode 100644 index 0000000..8dc52bd --- /dev/null +++ b/vclib/rindow_matlib_s_imax.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_imax not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_s_imax)( /* rindow_matlib_s_imax */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_imax _g_rindow_matlib_s_imax = NULL; +int32_t rindow_matlib_s_imax( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_imax==NULL) { + _g_rindow_matlib_s_imax = rindow_load_rindowmatlib_func("rindow_matlib_s_imax"); + if(_g_rindow_matlib_s_imax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_s_imax( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_imin.c b/vclib/rindow_matlib_s_imin.c new file mode 100644 index 0000000..6d1cd5f --- /dev/null +++ b/vclib/rindow_matlib_s_imin.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_imin not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_s_imin)( /* rindow_matlib_s_imin */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_imin _g_rindow_matlib_s_imin = NULL; +int32_t rindow_matlib_s_imin( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_imin==NULL) { + _g_rindow_matlib_s_imin = rindow_load_rindowmatlib_func("rindow_matlib_s_imin"); + if(_g_rindow_matlib_s_imin==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_s_imin( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_increment.c b/vclib/rindow_matlib_s_increment.c new file mode 100644 index 0000000..7c24930 --- /dev/null +++ b/vclib/rindow_matlib_s_increment.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_increment not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_increment)( /* rindow_matlib_s_increment */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float /* alpha */, + float /* beta */ +); +static PFNrindow_matlib_s_increment _g_rindow_matlib_s_increment = NULL; +void rindow_matlib_s_increment( + int32_t n, + float * x, + int32_t incX, + float alpha, + float beta +) +{ + if(_g_rindow_matlib_s_increment==NULL) { + _g_rindow_matlib_s_increment = rindow_load_rindowmatlib_func("rindow_matlib_s_increment"); + if(_g_rindow_matlib_s_increment==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_increment( + n, + x, + incX, + alpha, + beta + ); +} diff --git a/vclib/rindow_matlib_s_isnan.c b/vclib/rindow_matlib_s_isnan.c new file mode 100644 index 0000000..db94d81 --- /dev/null +++ b/vclib/rindow_matlib_s_isnan.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_isnan not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_isnan)( /* rindow_matlib_s_isnan */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_isnan _g_rindow_matlib_s_isnan = NULL; +void rindow_matlib_s_isnan( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_isnan==NULL) { + _g_rindow_matlib_s_isnan = rindow_load_rindowmatlib_func("rindow_matlib_s_isnan"); + if(_g_rindow_matlib_s_isnan==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_isnan( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_less.c b/vclib/rindow_matlib_s_less.c new file mode 100644 index 0000000..d1c8cec --- /dev/null +++ b/vclib/rindow_matlib_s_less.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_less not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_less)( /* rindow_matlib_s_less */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_less _g_rindow_matlib_s_less = NULL; +void rindow_matlib_s_less( + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_less==NULL) { + _g_rindow_matlib_s_less = rindow_load_rindowmatlib_func("rindow_matlib_s_less"); + if(_g_rindow_matlib_s_less==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_less( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_less_equal.c b/vclib/rindow_matlib_s_less_equal.c new file mode 100644 index 0000000..c935e55 --- /dev/null +++ b/vclib/rindow_matlib_s_less_equal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_less_equal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_less_equal)( /* rindow_matlib_s_less_equal */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_less_equal _g_rindow_matlib_s_less_equal = NULL; +void rindow_matlib_s_less_equal( + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_less_equal==NULL) { + _g_rindow_matlib_s_less_equal = rindow_load_rindowmatlib_func("rindow_matlib_s_less_equal"); + if(_g_rindow_matlib_s_less_equal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_less_equal( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_log.c b/vclib/rindow_matlib_s_log.c new file mode 100644 index 0000000..df5d8c7 --- /dev/null +++ b/vclib/rindow_matlib_s_log.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_log not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_log)( /* rindow_matlib_s_log */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_log _g_rindow_matlib_s_log = NULL; +void rindow_matlib_s_log( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_log==NULL) { + _g_rindow_matlib_s_log = rindow_load_rindowmatlib_func("rindow_matlib_s_log"); + if(_g_rindow_matlib_s_log==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_log( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_matrixcopy.c b/vclib/rindow_matlib_s_matrixcopy.c new file mode 100644 index 0000000..c8c1383 --- /dev/null +++ b/vclib/rindow_matlib_s_matrixcopy.c @@ -0,0 +1,45 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_matrixcopy not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_matrixcopy)( /* rindow_matlib_s_matrixcopy */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + float /* alpha */, + float * /* a */, + int32_t /* ldA */, + float * /* b */, + int32_t /* ldB */ +); +static PFNrindow_matlib_s_matrixcopy _g_rindow_matlib_s_matrixcopy = NULL; +void rindow_matlib_s_matrixcopy( + int32_t trans, + int32_t m, + int32_t n, + float alpha, + float * a, + int32_t ldA, + float * b, + int32_t ldB +) +{ + if(_g_rindow_matlib_s_matrixcopy==NULL) { + _g_rindow_matlib_s_matrixcopy = rindow_load_rindowmatlib_func("rindow_matlib_s_matrixcopy"); + if(_g_rindow_matlib_s_matrixcopy==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_matrixcopy( + trans, + m, + n, + alpha, + a, + ldA, + b, + ldB + ); +} diff --git a/vclib/rindow_matlib_s_maximum.c b/vclib/rindow_matlib_s_maximum.c new file mode 100644 index 0000000..ada05f3 --- /dev/null +++ b/vclib/rindow_matlib_s_maximum.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_maximum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_maximum)( /* rindow_matlib_s_maximum */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_maximum _g_rindow_matlib_s_maximum = NULL; +void rindow_matlib_s_maximum( + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_maximum==NULL) { + _g_rindow_matlib_s_maximum = rindow_load_rindowmatlib_func("rindow_matlib_s_maximum"); + if(_g_rindow_matlib_s_maximum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_maximum( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_minimum.c b/vclib/rindow_matlib_s_minimum.c new file mode 100644 index 0000000..4c872e3 --- /dev/null +++ b/vclib/rindow_matlib_s_minimum.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_minimum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_minimum)( /* rindow_matlib_s_minimum */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_minimum _g_rindow_matlib_s_minimum = NULL; +void rindow_matlib_s_minimum( + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_minimum==NULL) { + _g_rindow_matlib_s_minimum = rindow_load_rindowmatlib_func("rindow_matlib_s_minimum"); + if(_g_rindow_matlib_s_minimum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_minimum( + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_multiply.c b/vclib/rindow_matlib_s_multiply.c new file mode 100644 index 0000000..98de7ee --- /dev/null +++ b/vclib/rindow_matlib_s_multiply.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_multiply not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_multiply)( /* rindow_matlib_s_multiply */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_s_multiply _g_rindow_matlib_s_multiply = NULL; +void rindow_matlib_s_multiply( + int32_t trans, + int32_t m, + int32_t n, + float * x, + int32_t incX, + float * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_s_multiply==NULL) { + _g_rindow_matlib_s_multiply = rindow_load_rindowmatlib_func("rindow_matlib_s_multiply"); + if(_g_rindow_matlib_s_multiply==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_multiply( + trans, + m, + n, + x, + incX, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_s_nan2num.c b/vclib/rindow_matlib_s_nan2num.c new file mode 100644 index 0000000..9901e7b --- /dev/null +++ b/vclib/rindow_matlib_s_nan2num.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_nan2num not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_nan2num)( /* rindow_matlib_s_nan2num */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float /* alpha */ +); +static PFNrindow_matlib_s_nan2num _g_rindow_matlib_s_nan2num = NULL; +void rindow_matlib_s_nan2num( + int32_t n, + float * x, + int32_t incX, + float alpha +) +{ + if(_g_rindow_matlib_s_nan2num==NULL) { + _g_rindow_matlib_s_nan2num = rindow_load_rindowmatlib_func("rindow_matlib_s_nan2num"); + if(_g_rindow_matlib_s_nan2num==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_nan2num( + n, + x, + incX, + alpha + ); +} diff --git a/vclib/rindow_matlib_s_not.c b/vclib/rindow_matlib_s_not.c new file mode 100644 index 0000000..de8bc94 --- /dev/null +++ b/vclib/rindow_matlib_s_not.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_not not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_not)( /* rindow_matlib_s_not */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_not _g_rindow_matlib_s_not = NULL; +void rindow_matlib_s_not( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_not==NULL) { + _g_rindow_matlib_s_not = rindow_load_rindowmatlib_func("rindow_matlib_s_not"); + if(_g_rindow_matlib_s_not==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_not( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_notequal.c b/vclib/rindow_matlib_s_notequal.c new file mode 100644 index 0000000..5751c78 --- /dev/null +++ b/vclib/rindow_matlib_s_notequal.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_notequal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_notequal)( /* rindow_matlib_s_notequal */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_s_notequal _g_rindow_matlib_s_notequal = NULL; +void rindow_matlib_s_notequal( + int32_t n, + float * x, + int32_t incX, + float * y, + int32_t incY +) +{ + if(_g_rindow_matlib_s_notequal==NULL) { + _g_rindow_matlib_s_notequal = rindow_load_rindowmatlib_func("rindow_matlib_s_notequal"); + if(_g_rindow_matlib_s_notequal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_notequal( + n, + x, + incX, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_s_onehot.c b/vclib/rindow_matlib_s_onehot.c new file mode 100644 index 0000000..269f287 --- /dev/null +++ b/vclib/rindow_matlib_s_onehot.c @@ -0,0 +1,45 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_onehot not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_s_onehot)( /* rindow_matlib_s_onehot */ + int32_t /* dtype */, + int32_t /* m */, + int32_t /* n */, + void * /* x */, + int32_t /* incX */, + float /* alpha */, + float * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_s_onehot _g_rindow_matlib_s_onehot = NULL; +int32_t rindow_matlib_s_onehot( + int32_t dtype, + int32_t m, + int32_t n, + void * x, + int32_t incX, + float alpha, + float * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_s_onehot==NULL) { + _g_rindow_matlib_s_onehot = rindow_load_rindowmatlib_func("rindow_matlib_s_onehot"); + if(_g_rindow_matlib_s_onehot==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_s_onehot( + dtype, + m, + n, + x, + incX, + alpha, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_s_pow.c b/vclib/rindow_matlib_s_pow.c new file mode 100644 index 0000000..45a6eb5 --- /dev/null +++ b/vclib/rindow_matlib_s_pow.c @@ -0,0 +1,42 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_pow not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_pow)( /* rindow_matlib_s_pow */ + int32_t /* trans */, + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_pow _g_rindow_matlib_s_pow = NULL; +void rindow_matlib_s_pow( + int32_t trans, + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_pow==NULL) { + _g_rindow_matlib_s_pow = rindow_load_rindowmatlib_func("rindow_matlib_s_pow"); + if(_g_rindow_matlib_s_pow==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_pow( + trans, + m, + n, + a, + ldA, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_randomnormal.c b/vclib/rindow_matlib_s_randomnormal.c new file mode 100644 index 0000000..854b9b9 --- /dev/null +++ b/vclib/rindow_matlib_s_randomnormal.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_randomnormal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_randomnormal)( /* rindow_matlib_s_randomnormal */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float /* mean */, + float /* scale */, + int32_t /* seed */ +); +static PFNrindow_matlib_s_randomnormal _g_rindow_matlib_s_randomnormal = NULL; +void rindow_matlib_s_randomnormal( + int32_t n, + float * x, + int32_t incX, + float mean, + float scale, + int32_t seed +) +{ + if(_g_rindow_matlib_s_randomnormal==NULL) { + _g_rindow_matlib_s_randomnormal = rindow_load_rindowmatlib_func("rindow_matlib_s_randomnormal"); + if(_g_rindow_matlib_s_randomnormal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_randomnormal( + n, + x, + incX, + mean, + scale, + seed + ); +} diff --git a/vclib/rindow_matlib_s_randomuniform.c b/vclib/rindow_matlib_s_randomuniform.c new file mode 100644 index 0000000..174da76 --- /dev/null +++ b/vclib/rindow_matlib_s_randomuniform.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_randomuniform not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_randomuniform)( /* rindow_matlib_s_randomuniform */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float /* low */, + float /* high */, + int32_t /* seed */ +); +static PFNrindow_matlib_s_randomuniform _g_rindow_matlib_s_randomuniform = NULL; +void rindow_matlib_s_randomuniform( + int32_t n, + float * x, + int32_t incX, + float low, + float high, + int32_t seed +) +{ + if(_g_rindow_matlib_s_randomuniform==NULL) { + _g_rindow_matlib_s_randomuniform = rindow_load_rindowmatlib_func("rindow_matlib_s_randomuniform"); + if(_g_rindow_matlib_s_randomuniform==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_randomuniform( + n, + x, + incX, + low, + high, + seed + ); +} diff --git a/vclib/rindow_matlib_s_reciprocal.c b/vclib/rindow_matlib_s_reciprocal.c new file mode 100644 index 0000000..e8aa859 --- /dev/null +++ b/vclib/rindow_matlib_s_reciprocal.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_reciprocal not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_reciprocal)( /* rindow_matlib_s_reciprocal */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */, + float /* alpha */, + float /* beta */ +); +static PFNrindow_matlib_s_reciprocal _g_rindow_matlib_s_reciprocal = NULL; +void rindow_matlib_s_reciprocal( + int32_t n, + float * x, + int32_t incX, + float alpha, + float beta +) +{ + if(_g_rindow_matlib_s_reciprocal==NULL) { + _g_rindow_matlib_s_reciprocal = rindow_load_rindowmatlib_func("rindow_matlib_s_reciprocal"); + if(_g_rindow_matlib_s_reciprocal==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_reciprocal( + n, + x, + incX, + alpha, + beta + ); +} diff --git a/vclib/rindow_matlib_s_reduceargmax.c b/vclib/rindow_matlib_s_reduceargmax.c new file mode 100644 index 0000000..b59c599 --- /dev/null +++ b/vclib/rindow_matlib_s_reduceargmax.c @@ -0,0 +1,39 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_reduceargmax not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_reduceargmax)( /* rindow_matlib_s_reduceargmax */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + float * /* a */, + int32_t /* dtype */, + void * /* b */ +); +static PFNrindow_matlib_s_reduceargmax _g_rindow_matlib_s_reduceargmax = NULL; +void rindow_matlib_s_reduceargmax( + int32_t m, + int32_t n, + int32_t k, + float * a, + int32_t dtype, + void * b +) +{ + if(_g_rindow_matlib_s_reduceargmax==NULL) { + _g_rindow_matlib_s_reduceargmax = rindow_load_rindowmatlib_func("rindow_matlib_s_reduceargmax"); + if(_g_rindow_matlib_s_reduceargmax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_reduceargmax( + m, + n, + k, + a, + dtype, + b + ); +} diff --git a/vclib/rindow_matlib_s_reducegather.c b/vclib/rindow_matlib_s_reducegather.c new file mode 100644 index 0000000..3c93511 --- /dev/null +++ b/vclib/rindow_matlib_s_reducegather.c @@ -0,0 +1,48 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_reducegather not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_s_reducegather)( /* rindow_matlib_s_reducegather */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* m */, + int32_t /* n */, + int32_t /* numClass */, + int32_t /* dtype */, + void * /* x */, + float * /* a */, + float * /* b */ +); +static PFNrindow_matlib_s_reducegather _g_rindow_matlib_s_reducegather = NULL; +int32_t rindow_matlib_s_reducegather( + int32_t reverse, + int32_t addMode, + int32_t m, + int32_t n, + int32_t numClass, + int32_t dtype, + void * x, + float * a, + float * b +) +{ + if(_g_rindow_matlib_s_reducegather==NULL) { + _g_rindow_matlib_s_reducegather = rindow_load_rindowmatlib_func("rindow_matlib_s_reducegather"); + if(_g_rindow_matlib_s_reducegather==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_s_reducegather( + reverse, + addMode, + m, + n, + numClass, + dtype, + x, + a, + b + ); +} diff --git a/vclib/rindow_matlib_s_reducemax.c b/vclib/rindow_matlib_s_reducemax.c new file mode 100644 index 0000000..36d48b6 --- /dev/null +++ b/vclib/rindow_matlib_s_reducemax.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_reducemax not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_reducemax)( /* rindow_matlib_s_reducemax */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + float * /* a */, + float * /* b */ +); +static PFNrindow_matlib_s_reducemax _g_rindow_matlib_s_reducemax = NULL; +void rindow_matlib_s_reducemax( + int32_t m, + int32_t n, + int32_t k, + float * a, + float * b +) +{ + if(_g_rindow_matlib_s_reducemax==NULL) { + _g_rindow_matlib_s_reducemax = rindow_load_rindowmatlib_func("rindow_matlib_s_reducemax"); + if(_g_rindow_matlib_s_reducemax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_reducemax( + m, + n, + k, + a, + b + ); +} diff --git a/vclib/rindow_matlib_s_reducesum.c b/vclib/rindow_matlib_s_reducesum.c new file mode 100644 index 0000000..1233101 --- /dev/null +++ b/vclib/rindow_matlib_s_reducesum.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_reducesum not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_reducesum)( /* rindow_matlib_s_reducesum */ + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + float * /* a */, + float * /* b */ +); +static PFNrindow_matlib_s_reducesum _g_rindow_matlib_s_reducesum = NULL; +void rindow_matlib_s_reducesum( + int32_t m, + int32_t n, + int32_t k, + float * a, + float * b +) +{ + if(_g_rindow_matlib_s_reducesum==NULL) { + _g_rindow_matlib_s_reducesum = rindow_load_rindowmatlib_func("rindow_matlib_s_reducesum"); + if(_g_rindow_matlib_s_reducesum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_reducesum( + m, + n, + k, + a, + b + ); +} diff --git a/vclib/rindow_matlib_s_repeat.c b/vclib/rindow_matlib_s_repeat.c new file mode 100644 index 0000000..437242d --- /dev/null +++ b/vclib/rindow_matlib_s_repeat.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_repeat not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_repeat)( /* rindow_matlib_s_repeat */ + int32_t /* m */, + int32_t /* k */, + int32_t /* repeats */, + float * /* a */, + float * /* b */ +); +static PFNrindow_matlib_s_repeat _g_rindow_matlib_s_repeat = NULL; +void rindow_matlib_s_repeat( + int32_t m, + int32_t k, + int32_t repeats, + float * a, + float * b +) +{ + if(_g_rindow_matlib_s_repeat==NULL) { + _g_rindow_matlib_s_repeat = rindow_load_rindowmatlib_func("rindow_matlib_s_repeat"); + if(_g_rindow_matlib_s_repeat==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_repeat( + m, + k, + repeats, + a, + b + ); +} diff --git a/vclib/rindow_matlib_s_rsqrt.c b/vclib/rindow_matlib_s_rsqrt.c new file mode 100644 index 0000000..43c95f8 --- /dev/null +++ b/vclib/rindow_matlib_s_rsqrt.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_rsqrt not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_rsqrt)( /* rindow_matlib_s_rsqrt */ + int32_t /* n */, + float /* alpha */, + float * /* x */, + int32_t /* incX */, + float /* beta */ +); +static PFNrindow_matlib_s_rsqrt _g_rindow_matlib_s_rsqrt = NULL; +void rindow_matlib_s_rsqrt( + int32_t n, + float alpha, + float * x, + int32_t incX, + float beta +) +{ + if(_g_rindow_matlib_s_rsqrt==NULL) { + _g_rindow_matlib_s_rsqrt = rindow_load_rindowmatlib_func("rindow_matlib_s_rsqrt"); + if(_g_rindow_matlib_s_rsqrt==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_rsqrt( + n, + alpha, + x, + incX, + beta + ); +} diff --git a/vclib/rindow_matlib_s_searchsorted.c b/vclib/rindow_matlib_s_searchsorted.c new file mode 100644 index 0000000..85406a8 --- /dev/null +++ b/vclib/rindow_matlib_s_searchsorted.c @@ -0,0 +1,51 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_searchsorted not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_searchsorted)( /* rindow_matlib_s_searchsorted */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */, + float * /* x */, + int32_t /* incX */, + int32_t /* right */, + int32_t /* dtype */, + void * /* y */, + int32_t /* incY */ +); +static PFNrindow_matlib_s_searchsorted _g_rindow_matlib_s_searchsorted = NULL; +void rindow_matlib_s_searchsorted( + int32_t m, + int32_t n, + float * a, + int32_t ldA, + float * x, + int32_t incX, + int32_t right, + int32_t dtype, + void * y, + int32_t incY +) +{ + if(_g_rindow_matlib_s_searchsorted==NULL) { + _g_rindow_matlib_s_searchsorted = rindow_load_rindowmatlib_func("rindow_matlib_s_searchsorted"); + if(_g_rindow_matlib_s_searchsorted==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_searchsorted( + m, + n, + a, + ldA, + x, + incX, + right, + dtype, + y, + incY + ); +} diff --git a/vclib/rindow_matlib_s_sin.c b/vclib/rindow_matlib_s_sin.c new file mode 100644 index 0000000..025e325 --- /dev/null +++ b/vclib/rindow_matlib_s_sin.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_sin not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_sin)( /* rindow_matlib_s_sin */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_sin _g_rindow_matlib_s_sin = NULL; +void rindow_matlib_s_sin( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_sin==NULL) { + _g_rindow_matlib_s_sin = rindow_load_rindowmatlib_func("rindow_matlib_s_sin"); + if(_g_rindow_matlib_s_sin==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_sin( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_slice.c b/vclib/rindow_matlib_s_slice.c new file mode 100644 index 0000000..0927a71 --- /dev/null +++ b/vclib/rindow_matlib_s_slice.c @@ -0,0 +1,69 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_slice not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_slice)( /* rindow_matlib_s_slice */ + int32_t /* reverse */, + int32_t /* addMode */, + int32_t /* m */, + int32_t /* n */, + int32_t /* k */, + int32_t /* size */, + float * /* a */, + int32_t /* incA */, + float * /* y */, + int32_t /* incY */, + int32_t /* startAxis0 */, + int32_t /* sizeAxis0 */, + int32_t /* startAxis1 */, + int32_t /* sizeAxis1 */, + int32_t /* startAxis2 */, + int32_t /* sizeAxis2 */ +); +static PFNrindow_matlib_s_slice _g_rindow_matlib_s_slice = NULL; +void rindow_matlib_s_slice( + int32_t reverse, + int32_t addMode, + int32_t m, + int32_t n, + int32_t k, + int32_t size, + float * a, + int32_t incA, + float * y, + int32_t incY, + int32_t startAxis0, + int32_t sizeAxis0, + int32_t startAxis1, + int32_t sizeAxis1, + int32_t startAxis2, + int32_t sizeAxis2 +) +{ + if(_g_rindow_matlib_s_slice==NULL) { + _g_rindow_matlib_s_slice = rindow_load_rindowmatlib_func("rindow_matlib_s_slice"); + if(_g_rindow_matlib_s_slice==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_slice( + reverse, + addMode, + m, + n, + k, + size, + a, + incA, + y, + incY, + startAxis0, + sizeAxis0, + startAxis1, + sizeAxis1, + startAxis2, + sizeAxis2 + ); +} diff --git a/vclib/rindow_matlib_s_softmax.c b/vclib/rindow_matlib_s_softmax.c new file mode 100644 index 0000000..bef417b --- /dev/null +++ b/vclib/rindow_matlib_s_softmax.c @@ -0,0 +1,33 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_softmax not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_softmax)( /* rindow_matlib_s_softmax */ + int32_t /* m */, + int32_t /* n */, + float * /* a */, + int32_t /* ldA */ +); +static PFNrindow_matlib_s_softmax _g_rindow_matlib_s_softmax = NULL; +void rindow_matlib_s_softmax( + int32_t m, + int32_t n, + float * a, + int32_t ldA +) +{ + if(_g_rindow_matlib_s_softmax==NULL) { + _g_rindow_matlib_s_softmax = rindow_load_rindowmatlib_func("rindow_matlib_s_softmax"); + if(_g_rindow_matlib_s_softmax==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_softmax( + m, + n, + a, + ldA + ); +} diff --git a/vclib/rindow_matlib_s_sqrt.c b/vclib/rindow_matlib_s_sqrt.c new file mode 100644 index 0000000..0786793 --- /dev/null +++ b/vclib/rindow_matlib_s_sqrt.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_sqrt not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_sqrt)( /* rindow_matlib_s_sqrt */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_sqrt _g_rindow_matlib_s_sqrt = NULL; +void rindow_matlib_s_sqrt( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_sqrt==NULL) { + _g_rindow_matlib_s_sqrt = rindow_load_rindowmatlib_func("rindow_matlib_s_sqrt"); + if(_g_rindow_matlib_s_sqrt==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_sqrt( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_square.c b/vclib/rindow_matlib_s_square.c new file mode 100644 index 0000000..5bac810 --- /dev/null +++ b/vclib/rindow_matlib_s_square.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_square not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_square)( /* rindow_matlib_s_square */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_square _g_rindow_matlib_s_square = NULL; +void rindow_matlib_s_square( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_square==NULL) { + _g_rindow_matlib_s_square = rindow_load_rindowmatlib_func("rindow_matlib_s_square"); + if(_g_rindow_matlib_s_square==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_square( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_sum.c b/vclib/rindow_matlib_s_sum.c new file mode 100644 index 0000000..0d4c95f --- /dev/null +++ b/vclib/rindow_matlib_s_sum.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_sum not found\n"; +typedef float (CALLBACK* PFNrindow_matlib_s_sum)( /* rindow_matlib_s_sum */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_sum _g_rindow_matlib_s_sum = NULL; +float rindow_matlib_s_sum( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_sum==NULL) { + _g_rindow_matlib_s_sum = rindow_load_rindowmatlib_func("rindow_matlib_s_sum"); + if(_g_rindow_matlib_s_sum==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_s_sum( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_tan.c b/vclib/rindow_matlib_s_tan.c new file mode 100644 index 0000000..c838894 --- /dev/null +++ b/vclib/rindow_matlib_s_tan.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_tan not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_tan)( /* rindow_matlib_s_tan */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_tan _g_rindow_matlib_s_tan = NULL; +void rindow_matlib_s_tan( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_tan==NULL) { + _g_rindow_matlib_s_tan = rindow_load_rindowmatlib_func("rindow_matlib_s_tan"); + if(_g_rindow_matlib_s_tan==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_tan( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_tanh.c b/vclib/rindow_matlib_s_tanh.c new file mode 100644 index 0000000..13635f8 --- /dev/null +++ b/vclib/rindow_matlib_s_tanh.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_tanh not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_tanh)( /* rindow_matlib_s_tanh */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_tanh _g_rindow_matlib_s_tanh = NULL; +void rindow_matlib_s_tanh( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_tanh==NULL) { + _g_rindow_matlib_s_tanh = rindow_load_rindowmatlib_func("rindow_matlib_s_tanh"); + if(_g_rindow_matlib_s_tanh==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_tanh( + n, + x, + incX + ); +} diff --git a/vclib/rindow_matlib_s_transpose.c b/vclib/rindow_matlib_s_transpose.c new file mode 100644 index 0000000..6442732 --- /dev/null +++ b/vclib/rindow_matlib_s_transpose.c @@ -0,0 +1,36 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_transpose not found\n"; +typedef int32_t (CALLBACK* PFNrindow_matlib_s_transpose)( /* rindow_matlib_s_transpose */ + int32_t /* ndim */, + int32_t * /* shape */, + int32_t * /* perm */, + float * /* a */, + float * /* b */ +); +static PFNrindow_matlib_s_transpose _g_rindow_matlib_s_transpose = NULL; +int32_t rindow_matlib_s_transpose( + int32_t ndim, + int32_t * shape, + int32_t * perm, + float * a, + float * b +) +{ + if(_g_rindow_matlib_s_transpose==NULL) { + _g_rindow_matlib_s_transpose = rindow_load_rindowmatlib_func("rindow_matlib_s_transpose"); + if(_g_rindow_matlib_s_transpose==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return 0; + } + } + return _g_rindow_matlib_s_transpose( + ndim, + shape, + perm, + a, + b + ); +} diff --git a/vclib/rindow_matlib_s_zeros.c b/vclib/rindow_matlib_s_zeros.c new file mode 100644 index 0000000..3b11e0e --- /dev/null +++ b/vclib/rindow_matlib_s_zeros.c @@ -0,0 +1,30 @@ +#include +#include +#include "vclib.h" +static char msg_function_not_found[] = "rindow_matlib_s_zeros not found\n"; +typedef void (CALLBACK* PFNrindow_matlib_s_zeros)( /* rindow_matlib_s_zeros */ + int32_t /* n */, + float * /* x */, + int32_t /* incX */ +); +static PFNrindow_matlib_s_zeros _g_rindow_matlib_s_zeros = NULL; +void rindow_matlib_s_zeros( + int32_t n, + float * x, + int32_t incX +) +{ + if(_g_rindow_matlib_s_zeros==NULL) { + _g_rindow_matlib_s_zeros = rindow_load_rindowmatlib_func("rindow_matlib_s_zeros"); + if(_g_rindow_matlib_s_zeros==NULL) { + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + WriteConsole(hStdOut, msg_function_not_found, sizeof(msg_function_not_found), NULL, NULL); + return; + } + } + _g_rindow_matlib_s_zeros( + n, + x, + incX + ); +} diff --git a/vclib/vclib.h b/vclib/vclib.h new file mode 100644 index 0000000..192dcda --- /dev/null +++ b/vclib/vclib.h @@ -0,0 +1,4 @@ +#ifndef _RINDOW_MATLIB_VCLIB_H +#define _RINDOW_MATLIB_VCLIB_H +void* rindow_load_rindowmatlib_func(char *funcname); +#endif