1 # HAT Project
2
3 This is a fairly large project with Java and native (C/C++) artifacts.
4
5 To use HAT you will need to clone and build the `babylon` (JDK24+Babylon) project or of course your fork of the babylon project (say `babylon-myfork`)
6
7 [github.com/openjdk/babylon](https://github.com/openjdk/babylon)
8
9 The HAT project is in the 'hat' subdir of the babylon project.
10
11 ## Building Babylon
12
13 [See](docs/hat-01-02-building-babylon.md)
14
15 ## Building HAT
16
17 [See](docs/hat-01-03-building-hat.md)
18
19
20 ## Intellij and Clion
21 We can use JetBrains' `intelliJ` and `clion` but care must be taken as these tools
22 do not play well together, specifically we cannot have `Clion` and `Intellij`
23 project artifacts rooted under each other or in the same dir.
24
25 The `intellij` subdir houses the various `*.iml` module files and the project `.idea` so
26 just open that dir as an intellij project
27
28 Thankfully `clion` uses cmake. So we can reuse the same `hat/backends/CMakeLists.txt` that
29 maven uses to build the backends.
30
31 ### Initial Project Layout
32
33 ```
34 ${BABYLON_JDK}
35 └── hat
36 ├── build (created by the build)
37 │
38 ├── intellij
39 │ ├── .idea
40 │ │ ├── compiler.xml
41 │ │ ├── misc.xml
42 │ │ ├── modules.xml
43 │ │ ├── uiDesigner.xml
44 │ │ ├── vcs.xml
45 │ │ └── workspace.xml
46 │ │
47 │ ├── hat.iml
48 │ ├── backend_(spirv|mock|cuda|ptx|opencl).iml
49 │ └── (mandel|violajones|experiments|heal|view).iml
50 │
51 ├── hat
52 │ ├── pom.xml
53 │ └── src
54 │ ├── src/main/java
55 │ └── src/main/resources
56 │
57 ├── backends
58 │ ├── pom.xml
59 │ ├── CMakeLists.txt
60 │ └── (opencl|cuda|ptx|hip|mock|shared)
61 │ ├── pom.xml
62 │ ├── CMakeLists.txt
63 │ ├── cpp
64 │ ├── include
65 │ ├── src/main/java
66 │ └── src/main/resources
67 └── examples
68 ├── pom.xml
69 └── (mandel|violajones|squares|heal|view|experiments)
70 ├── pom.xml
71 ├── src/main/java
72 └── src/main/resources
73 ```
74 As you will note the `intellij` dir is somewhat self contained. the various `*.iml`
75 files refer to the source dirs using relative paths.