Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 3, 2024
1 parent c4d7d32 commit 9602096
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 37 deletions.
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ CLIJ*.txt
*~*
*.swp

# Maven
# Maven
target/

# Eclipse
# Eclipse
.classpath
.project
.settings/
/.metadata
/.recommenders

# vscode
# vscode
.vscode/

# binaries
# binaries
*.class
*.exp
*.obj
Expand All @@ -36,7 +36,7 @@ target/
# java cpp
cppbuild

# CMake
# CMake
CMakeCache.txt
CMakeFiles
CMakeScripts
Expand All @@ -56,4 +56,3 @@ __pycache__/
*.egg-info
python/dist
python/lib

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ repos:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: mixed-line-ending
- id: mixed-line-ending
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The current build instructions are for early adapters to test and give us feedba
## pre-requisites
### Install a c++ compiler

For windows look at the [CLIc_prototype windows build guide](https://github.com/clEsperanto/CLIc_prototype/blob/master/docs/how_to_build/windows_build/windows_build.md) and install Microsoft Build tools (or Visual Studio Community edition) as explained [here](https://biapol.github.io/blog/robert_haase/ms_build_tools/readme.html).
For windows look at the [CLIc_prototype windows build guide](https://github.com/clEsperanto/CLIc_prototype/blob/master/docs/how_to_build/windows_build/windows_build.md) and install Microsoft Build tools (or Visual Studio Community edition) as explained [here](https://biapol.github.io/blog/robert_haase/ms_build_tools/readme.html).
Hint: during installation, activate Windows C++ development.

### Install OpenCL
Expand All @@ -26,7 +26,7 @@ Add the folder where "cl.exe" lives to the PATH, e.g. this one:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64
```

Follow the instructions to build [CLIc](https://github.com/clEsperanto/CLIc_prototype/blob/master/docs/how_to_build/windows_build/windows_build.md).
Follow the instructions to build [CLIc](https://github.com/clEsperanto/CLIc_prototype/blob/master/docs/how_to_build/windows_build/windows_build.md).
Make sure when setting up CMAKE, that it is built into this directory as explained [here](https://github.com/clEsperanto/CLIc_prototype/blob/master/docs/how_to_build/windows_build/windows_build.md).

```
Expand Down Expand Up @@ -64,8 +64,8 @@ Download and install [cmake](https://cmake.org/download/).

Get [CLIc_prototype](https://github.com/clEsperanto/CLIc_prototype) and put code in the same directory as ```clesperantoj_prototype```.

Build and install using ```CLIc_prototype/build``` as the folder to place the build files generated by cmake
and ```CLIc_prototype/bin``` as the installation folder where the binaries will be placed.
Build and install using ```CLIc_prototype/build``` as the folder to place the build files generated by cmake
and ```CLIc_prototype/bin``` as the installation folder where the binaries will be placed.
It is important to use this code and installation folder as ```clesperantoj_protyotype``` uses them as include and link paths.

If using the cmake windows GUI and Visual Studio GUI
Expand Down Expand Up @@ -97,7 +97,7 @@ mvn

## Running the prototype

After the build succeeded, you can run the main functions in [this package](https://github.com/clEsperanto/clesperantoj_prototype/tree/main/src/main/java/net/clesperanto/test) and play with clesperantoj.
After the build succeeded, you can run the main functions in [this package](https://github.com/clEsperanto/clesperantoj_prototype/tree/main/src/main/java/net/clesperanto/test) and play with clesperantoj.
This is recommended to do from an IDE such as IntellIJ by clicking on the green triangle next to the main function:

![img.png](developer_docs/intellij_screenshot.png)
Expand All @@ -108,7 +108,7 @@ This is recommended to do from an IDE such as IntellIJ by clicking on the green

* Sometimes we had to make a trivial change to [clesperantoj][https://github.com/clEsperanto/clesperantoj_prototype/blob/javacpp/src/main/java/net/clesperanto/clicwrapper/clesperantoj.java], like adding a space, to activate the parser that generated the java wrapper.)

* In some cases, the build fails when executed the first time.
* In some cases, the build fails when executed the first time.
You find a potential workaround explained [here](https://github.com/clEsperanto/clesperantoj_prototype/issues/4#issuecomment-1184768674).

* You may need to add the src/gen/java path to the java build path in your IDE.
Expand Down
6 changes: 3 additions & 3 deletions guideline.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We will need the following tools installed and available in the path:

Most of those software will propose to be added to the path during installation. If not, you will need to add them manually.

#### **_For windows:_**
#### **_For windows:_**
To do so, open the "System" control panel, then "Advanced system settings", then "Environment Variables". In the "System variables" section, edit the "Path" variable and add the path to the executables.
E.g. for maven, you will need to add `C:\Program Files\apache-maven-3.6.0\bin` to the path.

Expand Down Expand Up @@ -55,7 +55,7 @@ The project is structured as follow:

* Sometimes we had to make a trivial change to [clesperantoj](https://github.com/clEsperanto/clesperantoj_prototype/blob/javacpp/src/main/java/net/clesperanto/clicwrapper/clesperantoj.java), like adding a space, to activate the parser that generated the java wrapper.)

* In some cases, the build fails when executed the first time.
* In some cases, the build fails when executed the first time.
You find a potential workaround explained [here](https://github.com/clEsperanto/clesperantoj_prototype/issues/4#issuecomment-1184768674).

* You may need to add the src/gen/java path to the java build path in your IDE.
Expand All @@ -65,4 +65,4 @@ You find a potential workaround explained [here](https://github.com/clEsperanto/
1. Go to Project -> Properties -> Java Build Path -> Source (tab). Then add src/main as a source folder.
2. Right-clicking your project, then click Properties.
3. In the left pane, click Java Build Path . In the right pane, select the Source tab.
4. Here you can add/edit/remove source folders.
4. Here you can add/edit/remove source folders.
1 change: 0 additions & 1 deletion native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ message(STATUS "ClesperantoJ and TEST")

add_subdirectory(clesperantoj)
add_subdirectory(clesperantoj_test)

10 changes: 4 additions & 6 deletions native/clesperantoj/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ case $PLATFORM in
# -DCMAKE_CXX_COMPILER="/usr/bin/g++" \
# -DCMAKE_CUDA_HOST_COMPILER="/usr/bin/g++" \
# -DOPENCL_INCLUDE_DIR="/usr/local/cuda/include/" \
# -DCLFFT_LIBRARY_DIR="/opt/OpenCL/clFFT-2.12.2-Linux-x64/lib64/" ..
make -j
# -DCLFFT_LIBRARY_DIR="/opt/OpenCL/clFFT-2.12.2-Linux-x64/lib64/" ..
make -j
make install
;;
macosx-*)
# the following line might not be necessary if make would be properly installed in the path
# CMAKE=/Applications/CMake.app/Contents/bin/cmake

$CMAKE -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="../../../lib/macosx/" ..
# -DCMAKE_CXX_COMPILER="g++" \
Expand All @@ -41,13 +41,11 @@ case $PLATFORM in
# -DOpenCL_LIBRARY="C:/Program Files (x86)/OCL_SDK_Light/lib/x86_64/opencl.lib" ..
# -DCLIC_INCLUDE_DIR="../../../CLIc_prototype/clic/include/core" \
# -DOCLCL_INCLUDE_DIR="../../../CLIc_prototype/thirdparty/opencl/ocl-clhpp/include" \
# -DCLFFT_LIBRARY_DIR="C:/OpenCL/clFFT-2.12.2-Windows-x64/lib64/import/" ..
# -DCLFFT_LIBRARY_DIR="C:/OpenCL/clFFT-2.12.2-Windows-x64/lib64/import/" ..
nmake
nmake install
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
;;
esac


2 changes: 1 addition & 1 deletion native/clesperantoj_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ message(STATUS "TEST")

add_executable(clesperantoj_test clictest.cpp)

target_link_libraries(clesperantoj_test PUBLIC clesperantoj::clesperantoj)
target_link_libraries(clesperantoj_test PUBLIC clesperantoj::clesperantoj)
2 changes: 1 addition & 1 deletion native/clesperantoj_test/clictest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ int main()
clesperanto.getDeviceInfo();

return 0;
}
}
20 changes: 10 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@



<dependencies>
<dependencies>
<!-- ImageJ dependencies -->
<dependency>
<groupId>net.imagej</groupId>
Expand Down Expand Up @@ -152,7 +152,7 @@
<workingDirectory>${project.basedir}/native</workingDirectory>
</configuration>
</execution>
</executions>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -223,14 +223,14 @@
<!-- link path to the OpenCL library
This provide the library path for javacpp to link to.
It (should) avoid the need to add the linkpath in the presets.
NB: Only needed on Windows unless the LIB env var contains the
NB: Only needed on Windows unless the LIB env var contains the
path to OpenCL lib and teh path to Windows Kit-->
</linkPaths>
<copyLibs>true</copyLibs>
</configuration>

<executions>

<!-- 1. Parse the c++ header files specified in java files to generate java wrapper classes -->
<execution>
<id>javacpp-parser</id>
Expand All @@ -246,7 +246,7 @@
</classOrPackageNames>
</configuration>
</execution>

<!-- 2. Process classes generated in step 1 to create c++ wrapper library -->
<execution>
<id>process-classes</id>
Expand All @@ -260,11 +260,11 @@
<classOrPackageName>net.clesperanto.wrapper.kernelj</classOrPackageName>
</classOrPackageNames>
</configuration>
</execution>
</execution>

</executions>
</plugin>

<!-- Test plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -274,7 +274,7 @@
<argLine>-Xmx2G</argLine>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/clesperanto/presets/clesperantoj.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ public void map(InfoMap infoMap) {

infoMap.put(new Info("cle::Array", "cle::Device", "cle::BackendManager", "cle::Backend").skip());
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/net/clesperanto/presets/kernelj.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public class kernelj implements InfoMapper {
public void map(InfoMap infoMap) {

}
}
}

0 comments on commit 9602096

Please sign in to comment.