GithubHelp home page GithubHelp logo

arrayfire / arrayfire-java Goto Github PK

View Code? Open in Web Editor NEW
35.0 14.0 18.0 164 KB

Java wrapper for ArrayFire

License: BSD 3-Clause "New" or "Revised" License

Java 66.38% C++ 31.63% C 0.54% CMake 1.45%
java gpu gpgpu arrayfire hpc java-wrapper

arrayfire-java's Introduction

arrayfire-java

Slack Channel

This repository contains the files required to use ArrayFire from Java.

Prerequisites

  • The latest version of ArrayFire. You can get ArrayFire using one of the following:

  • The latest version of JAVA SDK. It has been tested with OpenJDK 1.7 and OpenJDK 1.8. Make sure there is an environmental variable JAVA_HOME pointing to the root directory of java sdk installation.

  • CUDA

    • Tested for CUDA 7.5
  • CMake, minimum version of 2.8.

    • On Linux/OSX, it defaults to standard makefiles.
    • On Windows, we have tested with NMake Makefiles.

Contents

  • src/: Contains the source files for the ArrayFire Java wrapper

    • *.cpp The JNI wrapper files
    • jni_helper.h The JNI API helper functions
  • com/: Contains the Java source files implementing algorithms

  • examples: contains a few examples demonstrating the usage

Usage

After you the necessary pre-requisites, do the following:

  • mkdir build
  • cd build
  • Configure and generate the platform specific make files.
    • cmake .. on Linux/OSX
    • cmake -G "NMake Makefiles" .. on Windows from visual studio x64 command prompt.
  • Build the project and run helloworld example.
    • make && make exHelloWorld on Linux/OSX.
    • nmake && nmake exHelloWorld on Windows.

Documentation

  • TODO

License

  • Please check the LICENSE file in the root directory

arrayfire-java's People

Contributors

9prady9 avatar gitter-badger avatar pavanky avatar raymondtay avatar shadyboukhary avatar umar456 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arrayfire-java's Issues

Can't compile on windows

CMakeError.txt

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags:
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCCompilerId.exe
CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags:
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/elodan/Desktop/arrayfire-java-master/build/CMakeFiles/CMakeTmp

Run Build Command:"nmake" "/NOLOGO" "cmTC_f9692\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_f9692.dir\build.make /nologo -L CMakeFiles\cmTC_f9692.dir\build

Building C object CMakeFiles/cmTC_f9692.dir/testCCompiler.c.obj

C:\PROGRA2\MICROS1.0\VC\bin\cl.exe @C:\Users\elodan\AppData\Local\Temp\nm56E3.tmp

testCCompiler.c

Linking C executable cmTC_f9692.exe

"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_f9692.dir --manifests -- C:\PROGRA2\MICROS1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_f9692.dir\objects1.rsp @C:\Users\elodan\AppData\Local\Temp\nm5713.tmp

RC Pass 1 failed to run.
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'

Stop.

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags: /DWIN32;/D_WINDOWS;/W3
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCCompilerId.exe
CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags:
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'

Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/elodan/Desktop/arrayfire-java-master/build/CMakeFiles/CMakeTmp

Run Build Command:"nmake" "/NOLOGO" "cmTC_48a8d\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe" -f CMakeFiles\cmTC_48a8d.dir\build.make /nologo -L CMakeFiles\cmTC_48a8d.dir\build

Building C object CMakeFiles/cmTC_48a8d.dir/testCCompiler.c.obj

C:\PROGRA2\MICROS1.0\VC\bin\cl.exe @C:\Users\elodan\AppData\Local\Temp\nm3DF3.tmp

testCCompiler.c

Linking C executable cmTC_48a8d.exe

"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_48a8d.dir --manifests -- C:\PROGRA2\MICROS1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_48a8d.dir\objects1.rsp @C:\Users\elodan\AppData\Local\Temp\nm3E13.tmp

RC Pass 1 failed to run.
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe"' : return code '0x2'

Stop.

CMakeOutput.txt

The system is: Windows - 10.0.14393 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags:
Id flags: -c

The output was:
0
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCCompilerId.c

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.obj"

The C compiler identification is MSVC, found in "C:/Users/elodan/Desktop/arrayfire-java-master/build/CMakeFiles/3.8.0/CompilerIdC/CMakeCCompilerId.obj"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags:
Id flags: -c

The output was:
0
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerId.cpp

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj"

The CXX compiler identification is MSVC, found in "C:/Users/elodan/Desktop/arrayfire-java-master/build/CMakeFiles/3.8.0/CompilerIdCXX/CMakeCXXCompilerId.obj"

Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags: /DWIN32;/D_WINDOWS;/W3
Id flags: -c

The output was:
0
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCCompilerId.c

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.obj"

The C compiler identification is MSVC, found in "C:/Users/elodan/Desktop/arrayfire-java-master/build/CMakeFiles/3.8.0/CompilerIdC/CMakeCCompilerId.obj"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Build flags:
Id flags: -c

The output was:
0
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerId.cpp

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj"

The CXX compiler identification is MSVC, found in "C:/Users/elodan/Desktop/arrayfire-java-master/build/CMakeFiles/3.8.0/CompilerIdCXX/CMakeCXXCompilerId.obj"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.