Skip to content

Commit c30f1f1

Browse files
committed
Initial commit
1 parent 00eaa96 commit c30f1f1

27 files changed

+56057
-20
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
target
2+
/.settings
3+
/nativeLibraries
4+
/JOCLBLAS_0_0_1-windows-x86_64.dll
5+
/.classpath
6+
/.project
7+
/clBLAS.dll

CMakeLists.txt

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
#############################################################################
4+
# Overriding the CMake flags to use static runtime libraries
5+
# See http://www.cmake.org/Wiki/CMake_FAQ#
6+
# How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
7+
set(CMAKE_USER_MAKE_RULES_OVERRIDE
8+
${CMAKE_CURRENT_SOURCE_DIR}/../JOCLCommon/CMake_c_flag_overrides.cmake)
9+
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
10+
${CMAKE_CURRENT_SOURCE_DIR}/../JOCLCommon/CMake_cxx_flag_overrides.cmake)
11+
12+
project(JOCLBLAS)
13+
14+
15+
#############################################################################
16+
# Add the dependencies to JNI and the JOCLCommon project
17+
18+
find_package(JNI REQUIRED)
19+
add_subdirectory(../JOCLCommon
20+
${CMAKE_CURRENT_BINARY_DIR}/JOCLCommon)
21+
22+
23+
#############################################################################
24+
# Set the variables that are later used to build the name of the native
25+
# library, e.g. "JOCL-0_2_0-windows-x86_64.dll"
26+
27+
set(JOCL_BLAS_VERSION "0_0_1")
28+
29+
if(CMAKE_HOST_WIN32)
30+
set(JOCL_HOST "windows")
31+
elseif(CMAKE_HOST_APPLE)
32+
set(JOCL_HOST "apple")
33+
set(CMAKE_SKIP_RPATH FALSE)
34+
elseif(CMAKE_HOST_UNIX)
35+
set(JOCL_HOST "linux")
36+
endif()
37+
38+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
39+
set(JOCL_ARCH "x86_64")
40+
else()
41+
set(JOCL_ARCH "x86")
42+
endif()
43+
44+
45+
#############################################################################
46+
# Compiler settings
47+
48+
if(MSVC)
49+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4514 /wd4820 /wd4710 /wd4711 /wd4350 /wd4668")
50+
endif()
51+
set(BUILD_SHARED_LIBS ON)
52+
53+
#############################################################################
54+
# Output directories
55+
56+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/nativeLibraries/Debug)
57+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/nativeLibraries)
58+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/nativeLibraries)
59+
60+
61+
#############################################################################
62+
# Define the include directories and source files
63+
64+
include_directories(
65+
src/main/native
66+
src/main/include/
67+
${JOCLCommon_SOURCE_DIR}/src/main/include
68+
${JOCLCommon_SOURCE_DIR}/src/main/native
69+
${JNI_INCLUDE_DIRS}
70+
)
71+
72+
add_library(JOCLBLAS_${JOCL_BLAS_VERSION}-${JOCL_HOST}-${JOCL_ARCH}
73+
src/main/native/JOCLBLAS.cpp
74+
)
75+
76+
find_library(clBLAS_LIBRARY
77+
NAMES clBLAS
78+
HINTS ${PROJECT_SOURCE_DIR}/lib
79+
)
80+
81+
target_link_libraries(
82+
JOCLBLAS_${JOCL_BLAS_VERSION}-${JOCL_HOST}-${JOCL_ARCH}
83+
${clBLAS_LIBRARY}
84+
JOCLCommon)

LICENSE

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
The MIT License (MIT)
1+
JOCL - Java bindings for OpenCL
22

3-
Copyright (c) 2016 Marco Hutter
3+
Copyright (c) 2009-2016 Marco Hutter - http://www.jocl.org
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person
6+
obtaining a copy of this software and associated documentation
7+
files (the "Software"), to deal in the Software without
8+
restriction, including without limitation the rights to use,
9+
copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the
11+
Software is furnished to do so, subject to the following
12+
conditions:
1113

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
2216

17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
# JOCLBLAS
2-
JOCLBLAS - Java bindings for clBLAS
1+
# JOCLBLAS
2+
3+
JOCLBLAS - Java Bindings for clBLAS - http://jocl.org
4+
5+
**Under construction!**
6+
7+
8+

lib/clBLAS.lib

33.7 KB
Binary file not shown.

pom.xml

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
3+
<parent>
4+
<groupId>org.sonatype.oss</groupId>
5+
<artifactId>oss-parent</artifactId>
6+
<version>9</version>
7+
</parent>
8+
9+
<modelVersion>4.0.0</modelVersion>
10+
11+
<groupId>org.jocl</groupId>
12+
<artifactId>jocl-blas</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
15+
<packaging>jar</packaging>
16+
17+
<name>JOCLBLAS</name>
18+
<description>Java bindings for clBLAS</description>
19+
<url>http://www.jocl.org</url>
20+
21+
<licenses>
22+
<license>
23+
<name>MIT</name>
24+
<url>http://jocl.org/downloads/LICENSE.TXT</url>
25+
<distribution>repo</distribution>
26+
</license>
27+
</licenses>
28+
29+
<developers>
30+
<developer>
31+
<name>Marco Hutter</name>
32+
<email>[email protected]</email>
33+
<roles>
34+
<role>developer</role>
35+
</roles>
36+
</developer>
37+
</developers>
38+
39+
<scm>
40+
<connection>scm:git:[email protected]:gpu/JOCLBLAS.git</connection>
41+
<developerConnection>scm:git:[email protected]:gpu/JOCLBLAS.git</developerConnection>
42+
<url>[email protected]:gpu/JOCLBLAS.git</url>
43+
</scm>
44+
45+
<build>
46+
<defaultGoal>package</defaultGoal>
47+
48+
<plugins>
49+
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-compiler-plugin</artifactId>
53+
<version>2.3.2</version>
54+
<configuration>
55+
<source>1.6</source>
56+
<target>1.6</target>
57+
</configuration>
58+
</plugin>
59+
60+
<plugin>
61+
<groupId>org.apache.maven.plugins</groupId>
62+
<artifactId>maven-resources-plugin</artifactId>
63+
<version>2.4.3</version>
64+
65+
<configuration>
66+
<encoding>UTF-8</encoding>
67+
</configuration>
68+
69+
<executions>
70+
71+
<execution>
72+
<id>copy-resources</id>
73+
<phase>prepare-package</phase>
74+
<goals>
75+
<goal>copy-resources</goal>
76+
</goals>
77+
<configuration>
78+
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
79+
<resources>
80+
<resource>
81+
<directory>${project.basedir}/nativeLibraries/</directory>
82+
<filtering>false</filtering>
83+
<includes>
84+
<include>**/*.dll</include>
85+
<include>**/*.jnilib</include>
86+
<include>**/*.dylib</include>
87+
<include>**/*.so</include>
88+
</includes>
89+
</resource>
90+
</resources>
91+
</configuration>
92+
</execution>
93+
94+
</executions>
95+
96+
</plugin>
97+
98+
99+
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-source-plugin</artifactId>
103+
<version>2.1.2</version>
104+
<executions>
105+
<execution>
106+
<id>attach-sources</id>
107+
<goals>
108+
<goal>jar</goal>
109+
</goals>
110+
</execution>
111+
</executions>
112+
</plugin>
113+
114+
<plugin>
115+
<groupId>org.apache.maven.plugins</groupId>
116+
<artifactId>maven-javadoc-plugin</artifactId>
117+
<version>2.7</version>
118+
<executions>
119+
<execution>
120+
<id>attach-javadocs</id>
121+
<goals>
122+
<goal>jar</goal>
123+
</goals>
124+
<configuration>
125+
<additionalparam>-Xdoclint:none</additionalparam>
126+
</configuration>
127+
</execution>
128+
</executions>
129+
</plugin>
130+
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-surefire-plugin</artifactId>
134+
<version>2.18.1</version>
135+
<configuration>
136+
<forkMode>once</forkMode>
137+
<argLine>-Djava.library.path=${project.basedir}/nativeLibraries</argLine>
138+
</configuration>
139+
</plugin>
140+
141+
</plugins>
142+
</build>
143+
144+
<dependencies>
145+
<dependency>
146+
<groupId>junit</groupId>
147+
<artifactId>junit</artifactId>
148+
<version>4.11</version>
149+
<scope>test</scope>
150+
</dependency>
151+
<dependency>
152+
<groupId>org.jocl</groupId>
153+
<artifactId>jocl</artifactId>
154+
<version>0.2.0-RC01-SNAPSHOT</version>
155+
</dependency>
156+
</dependencies>
157+
</project>
158+
159+
160+
161+
162+
163+
164+

0 commit comments

Comments
 (0)