Skip to content

Commit e5bbddd

Browse files
authored
Merge pull request #115 from marktwtn/semantic-versioning
Improve Doxgen-friendly comments
2 parents ea1dfdf + 2a30d87 commit e5bbddd

File tree

5 files changed

+81
-0
lines changed

5 files changed

+81
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Generated files
22
build/
3+
docs/html
34

45
# Object files
56
*.o

Doxyfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#---------------------------------------------------------------------------
2+
# Project related configuration options
3+
#---------------------------------------------------------------------------
4+
PROJECT_NAME = "dcurl"
5+
PROJECT_NUMBER = 0.1.0
6+
OUTPUT_DIRECTORY = docs
7+
OPTIMIZE_OUTPUT_FOR_C = YES
8+
#---------------------------------------------------------------------------
9+
# Configuration options related to warning and progress messages
10+
#---------------------------------------------------------------------------
11+
QUIET = YES
12+
#---------------------------------------------------------------------------
13+
# Configuration options related to the input files
14+
#---------------------------------------------------------------------------
15+
INPUT = . \
16+
docs \
17+
src
18+
FILE_PATTERNS = dcurl.c \
19+
dcurl.h \
20+
*.md
21+
USE_MDFILE_AS_MAINPAGE = README.md
22+
#---------------------------------------------------------------------------
23+
# Configuration options related to source browsing
24+
#---------------------------------------------------------------------------
25+
SOURCE_BROWSER = YES
26+
INLINE_SOURCES = YES
27+
REFERENCED_BY_RELATION = YES
28+
REFERENCES_RELATION = YES
29+
#---------------------------------------------------------------------------
30+
# Configuration options related to the LaTeX output
31+
#---------------------------------------------------------------------------
32+
GENERATE_LATEX = NO

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/DLTcollab/dcurl.svg?branch=dev)](https://travis-ci.org/DLTcollab/dcurl)
44
![Supported IRI version](https://img.shields.io/badge/Supported%20IRI%20Version-1.6.0-brightgreen.svg)
5+
![Release version](https://img.shields.io/github/release-pre/DLTcollab/dcurl.svg)
56

67
Hardware-accelerated implementation for IOTA PearlDiver, which utilizes multi-threaded SIMD, FPGA and GPU.
78

src/common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#include <stdint.h>
55
#include <time.h>
66

7+
#define __DCURL_MAJOR__ 0
8+
#define __DCURL_MINOR__ 1
9+
#define __DCURL_PATCH__ 0
10+
711
double diff_in_second(struct timespec t1, struct timespec t2);
812

913
typedef struct _pow_info PoW_Info;

src/dcurl.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,51 @@
44
#include <stdbool.h>
55
#include "trinary.h"
66

7+
/**
8+
* @file dcurl.h
9+
* @brief dcurl API functions.
10+
*
11+
* dcurl is a hardware-accelerated implementation for IOTA PearlDiver.
12+
* It supports multi-threaded SIMD on CPU, OpenCL on GPU and FPGA to
13+
* make a faster proof-of-work(PoW) for IOTA.
14+
* The API functions can be used to initialize, execute and destroy dcurl
15+
* easily.
16+
*/
17+
18+
/**
19+
* @brief dcurl initialization.
20+
*
21+
* Register the determined hardware into the list and initialize the
22+
* corresponding resource.
23+
* @return
24+
* - true: initialization succeeded.
25+
* - false: initialization failed.
26+
*/
727
bool dcurl_init();
28+
29+
/**
30+
* @brief dcurl destruction.
31+
*
32+
* Remove the registered hardware from the list and release the corresponding
33+
* resource.
34+
*/
835
void dcurl_destroy();
36+
37+
/**
38+
* @brief dcurl execution.
39+
*
40+
* Retrieve the available hardware from the list and use it to do the
41+
* PoW(Proof-of-Work).
42+
* @param [in] trytes The trytes for PoW calculation.
43+
* @param [in] mwm The minimum weight magnitude.
44+
* @param [in] threads
45+
* @parblock
46+
* The thread number of calculating the PoW. It affects CPU only.
47+
*
48+
* 0: use (maximum threads - 1).
49+
* @endparblock
50+
* @return The result of PoW.
51+
*/
952
int8_t *dcurl_entry(int8_t *trytes, int mwm, int threads);
1053

1154
#endif

0 commit comments

Comments
 (0)