Skip to content

Commit

Permalink
Merge pull request #115 from marktwtn/semantic-versioning
Browse files Browse the repository at this point in the history
Improve Doxgen-friendly comments
  • Loading branch information
jserv authored Feb 27, 2019
2 parents ea1dfdf + 2a30d87 commit e5bbddd
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated files
build/
docs/html

# Object files
*.o
Expand Down
32 changes: 32 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "dcurl"
PROJECT_NUMBER = 0.1.0
OUTPUT_DIRECTORY = docs
OPTIMIZE_OUTPUT_FOR_C = YES
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = . \
docs \
src
FILE_PATTERNS = dcurl.c \
dcurl.h \
*.md
USE_MDFILE_AS_MAINPAGE = README.md
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

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

Expand Down
4 changes: 4 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include <stdint.h>
#include <time.h>

#define __DCURL_MAJOR__ 0
#define __DCURL_MINOR__ 1
#define __DCURL_PATCH__ 0

double diff_in_second(struct timespec t1, struct timespec t2);

typedef struct _pow_info PoW_Info;
Expand Down
43 changes: 43 additions & 0 deletions src/dcurl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,51 @@
#include <stdbool.h>
#include "trinary.h"

/**
* @file dcurl.h
* @brief dcurl API functions.
*
* dcurl is a hardware-accelerated implementation for IOTA PearlDiver.
* It supports multi-threaded SIMD on CPU, OpenCL on GPU and FPGA to
* make a faster proof-of-work(PoW) for IOTA.
* The API functions can be used to initialize, execute and destroy dcurl
* easily.
*/

/**
* @brief dcurl initialization.
*
* Register the determined hardware into the list and initialize the
* corresponding resource.
* @return
* - true: initialization succeeded.
* - false: initialization failed.
*/
bool dcurl_init();

/**
* @brief dcurl destruction.
*
* Remove the registered hardware from the list and release the corresponding
* resource.
*/
void dcurl_destroy();

/**
* @brief dcurl execution.
*
* Retrieve the available hardware from the list and use it to do the
* PoW(Proof-of-Work).
* @param [in] trytes The trytes for PoW calculation.
* @param [in] mwm The minimum weight magnitude.
* @param [in] threads
* @parblock
* The thread number of calculating the PoW. It affects CPU only.
*
* 0: use (maximum threads - 1).
* @endparblock
* @return The result of PoW.
*/
int8_t *dcurl_entry(int8_t *trytes, int mwm, int threads);

#endif

0 comments on commit e5bbddd

Please sign in to comment.