-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #291 from TESSEorg/evaleev/dox/hw-example
devsamp/main -> devsamp/helloworld
- Loading branch information
Showing
15 changed files
with
112 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Largest Fibonacci number | ||
|
||
This directory contains TTG programs computing the largest Fibonacci number smaller than $N$: | ||
|
||
- CPU version: `fibonacci.cc` | ||
- Device version: `fibonacci_device.cc` | ||
- CUDA kernel: `fibonacci_cuda_kernel.{cu,h}` | ||
|
||
## Build | ||
|
||
After TTG has been installed to `/path/to/ttg`, do this: | ||
|
||
- configure: `cmake -S . -B build -DCMAKE_PREFIX_PATH="/path/to/ttg"` | ||
- build: | ||
- CPU version: `cmake --build build --target fibonacci` | ||
- CUDA version (TTG must have been configured with CUDA support): `cmake --build build --target fibonacci_cuda` | ||
- run: `./build/fibonacci N` or `./build/fibonacci_cuda N` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
project(ttg-devsample-helloworld) | ||
|
||
find_package(ttg REQUIRED) | ||
if (NOT TARGET ttg-parsec) # else build from source | ||
include(FetchContent) | ||
FetchContent_Declare(ttg GIT_REPOSITORY https://github.com/TESSEorg/ttg.git) | ||
FetchContent_MakeAvailable( ttg ) | ||
endif() | ||
|
||
add_ttg_executable(helloworld helloworld.cpp NOT_EXCLUDE_FROM_ALL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# TTG "Hello World" | ||
|
||
This directory contains the TTG "Hello World" program | ||
|
||
## Build | ||
|
||
After TTG has been installed to `/path/to/ttg`, do this: | ||
|
||
- configure: `cmake -S . -B build -DCMAKE_PREFIX_PATH="/path/to/ttg"` | ||
- build: `cmake --build build` | ||
- run: `./build/helloworld-parsec` or `./build/helloworld-mad` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <ttg.h> | ||
|
||
using namespace ttg; | ||
|
||
int main(int argc, char *argv[]) { | ||
ttg::initialize(argc, argv); | ||
|
||
auto tt = ttg::make_tt([]() { std::cout << "Hello, World!\n"; }); | ||
|
||
ttg::make_graph_executable(tt); | ||
ttg::execute(); | ||
if (ttg::get_default_world().rank() == 0) tt->invoke(); | ||
ttg::fence(); | ||
|
||
ttg::finalize(); | ||
return 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.