Skip to content

Commit 8cf6dec

Browse files
committed
Revert to a clean state before merging the dependencies
1 parent 194a303 commit 8cf6dec

File tree

7 files changed

+233
-159
lines changed

7 files changed

+233
-159
lines changed

include/CMakeLists.txt

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -219,30 +219,20 @@ install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/graphblas/interfaces/"
219219

220220
install( TARGETS algorithms EXPORT GraphBLASTargets )
221221

222-
# generate the spblas header with the library prefix
223-
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/transition/spblas.h.in
224-
${CMAKE_CURRENT_BINARY_DIR}/transition/spblas.h @ONLY
225-
)
226-
227222
# this target lists the transition path headers
228223
# these are plain C headers and do not have any dependences
229-
add_library( transition_headers INTERFACE )
224+
add_library( transition INTERFACE )
230225

231226
target_include_directories(
232-
transition_headers INTERFACE
227+
transition INTERFACE
233228
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/transition/>
234-
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/transition/>
235229
$<INSTALL_INTERFACE:transition/>
236230
)
237231

238-
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/transition/spblas.h
239-
DESTINATION "${INCLUDE_INSTALL_DIR}/transition"
240-
)
241-
242232
install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/transition/"
243-
DESTINATION "${INCLUDE_INSTALL_DIR}/transition"
233+
DESTINATION "${GRB_INCLUDE_INSTALL_DIR}/../transition/"
244234
FILES_MATCHING REGEX "${HEADERS_REGEX}"
245235
)
246236

247-
install( TARGETS transition_headers EXPORT GraphBLASTargets )
237+
install( TARGETS transition EXPORT GraphBLASTargets )
248238

include/graphblas.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
* -# generalised sparse linear algebra, \ref GraphBLAS;
3939
* -# vertex-centric programming, \ref Pregel.
4040
*
41-
* Additionally, to ease integration with existing software, ALP defines
42-
* so-called \ref TRANS libraries, which presently includes (partial)
43-
* implementations of the \ref SPARSEBLAS and \ref SPBLAS (de-facto) standards,
44-
* as well as an interface for numerical \ref TRANS_SOLVERS.
45-
*
4641
* Several other programming interfaces are under design at present.
4742
*
4843
* For authors who contributed to ALP, please see the NOTICE file.

include/transition/blas_sparse.h

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,6 @@
2121
* This is the ALP implementation of a subset of the NIST Sparse BLAS standard.
2222
* While the API is standardised, this header makes some implementation-specific
2323
* extensions.
24-
*
25-
* @author A. N. Yzelman
26-
* @date 2023
27-
*/
28-
29-
/**
30-
* \defgroup TRANS Transition path
31-
*
32-
* The transition path libraries enable integrating ALP with existing software.
33-
* It operates by exposing several of its functionalities via established C
34-
* interfaces and established data formats in order to facilitate the transition
35-
* of legacy software to ALP. Ideally, users of transition interfaces need only
36-
* re-compile and link their software; in some cases, trivial modifications
37-
* might be required to migrate to transition interfaces, e.g., changing the
38-
* prefix of called functions.
39-
*
40-
* The currently exposed interfaces are:
41-
* - \ref SPARSEBLAS;
42-
* - \ref SPBLAS; and
43-
* - \ref TRANS_SOLVERS.
44-
*
45-
* All of these transition libraries show-case ALP's ability to quickly wrap
46-
* around external APIs, thus simplifying integration of ALP-backed code with
47-
* existing software. We do note, however, that the direct use of the native C++
48-
* ALP API may lead to higher performance than the use of these transition path
49-
* interfaces, and that in some cases the legacy interface itself is what makes
50-
* achieving such higher performance impossible.
51-
*
52-
* The current transition path interfaces are at an *experimental prototype
53-
* phase*; in particular, not all primitives in a given standard API are
54-
* currently implemented. For \ref SPARSEBLAS in particular, additional support
55-
* or coverage may freely be requested in GitHub issue #14. For other
56-
* interfaces, feel free to open new issues or to contact the maintainers.
5724
*/
5825

5926
#ifndef _H_ALP_SPARSEBLAS_NIST
@@ -65,41 +32,6 @@
6532
extern "C" {
6633
#endif
6734

68-
/**
69-
* \defgroup SPARSEBLAS SparseBLAS
70-
* \ingroup TRANS
71-
*
72-
* A SparseBLAS implementation enabled by ALP/GraphBLAS
73-
*
74-
* ALP provides a (presently partial) implementation of the Sparse BLAS standard
75-
* as defined by the BLAS forum and in the following paper:
76-
* - Duff, Iain S., Michael A. Heroux, and Roldan Pozo. "An overview of the
77-
* sparse basic linear algebra subprograms: The new standard from the BLAS
78-
* technical forum." ACM Transactions on Mathematical Software (TOMS) 28(2),
79-
* 2002, pp. 239-267.
80-
*
81-
* We also provide a couple of extensions over this standard, in particular to
82-
* add support for sparse vectors. Such extensions are prefixed by
83-
* <tt>EXTBLAS_</tt> and <tt>extblas_</tt>, such as, for example,
84-
* - #EXTBLAS_dusv_begin and
85-
* - #extblas_sparse_vector.
86-
* This prefix can be configured differently, please refer to the developer
87-
* documentation if looking for this option.
88-
*
89-
* The functionalities defined by the standard of course retain the prefix
90-
* defined by the standard: <tt>BLAS_</tt> and <tt>blas_</tt>, such as, e.g.,
91-
* - #BLAS_duscr_begin and
92-
* - #blas_sparse_matrix.
93-
*
94-
* The implementation of this standard is done by mapping back to the equivalent
95-
* ALP/GraphBLAS primitives. By default, ALP builds both sequential and shared-
96-
* memory parallel SparseBLAS libraries. It does so simply by compiling the same
97-
* ALP-based SparseBLAS implementation with a sequential and a shared-memory ALP
98-
* backend, respectively.
99-
*
100-
* @{
101-
*/
102-
10335
/**
10436
* The possible transposition types.
10537
*
@@ -261,8 +193,8 @@ int BLAS_dusmm(
261193
int EXTBLAS_dusmsv(
262194
const enum blas_trans_type transa,
263195
const double alpha, const blas_sparse_matrix A,
264-
const EXTBLAS_TYPE( sparse_vector ) x,
265-
EXTBLAS_TYPE( sparse_vector ) y
196+
const extblas_sparse_vector x,
197+
extblas_sparse_vector y
266198
);
267199

268200
/**
@@ -397,8 +329,6 @@ int EXTBLAS_dusm_clear( blas_sparse_matrix A );
397329
*/
398330
int EXTBLAS_free();
399331

400-
/**@}*/ // ends the SparseBLAS doxygen group
401-
402332
#ifdef __cplusplus
403333
} // end extern "C"
404334
#endif

include/transition/blas_sparse_vec.h

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,17 @@
2121
* This is an ALP-specific extension to the NIST Sparse BLAS standard, which
2222
* the ALP libsparseblas transition path also introduces to the de-facto spblas
2323
* standard.
24-
*
25-
* @author A. N. Yzelman
26-
* @date 2023
2724
*/
2825

2926
#ifndef _H_ALP_SPARSEBLAS_EXT_VEC
3027
#define _H_ALP_SPARSEBLAS_EXT_VEC
3128

32-
/**
33-
* \addtogroup SPARSEBLAS
34-
* @{
35-
*/
36-
37-
/**@{*/
38-
/** \internal Helper macros for #EXTBLAS_FUN and #EXTBLAS_TYPE */
39-
#define __SPBLAS_CONC( _a, _b ) _a ## _b
40-
#define __SPBLAS_CONCAT( _a, _b ) __SPBLAS_CONC( _a, _b )
41-
#define SPCONCAT( _a, _b ) __SPBLAS_CONCAT( _a, _b )
42-
/**@}*/
43-
4429
#ifdef __cplusplus
4530
extern "C" {
4631
#endif
4732

48-
/**@{*/
49-
/**
50-
* \internal
51-
*
52-
* Allows renaming our non-standard functions with some other prefix.
53-
*
54-
* The default prefixes are <tt>EXTBLAS_</tt> for functions and
55-
* <tt>extblas_</tt> for types.
56-
*
57-
* \endinternal
58-
*/
59-
#define EXTBLAS_FUN( name ) SPCONCAT( EXTBLAS_, name )
60-
#define EXTBLAS_TYPE( name ) SPCONCAT( extblas_, name )
61-
/**@}*/
62-
6333
/** A sparse vector. This is an implementation-specific extension. */
64-
typedef void * EXTBLAS_TYPE( sparse_vector );
34+
typedef void * extblas_sparse_vector;
6535

6636
/**
6737
* Creates a handle to a new sparse vector that holds no entries.
@@ -72,7 +42,7 @@ typedef void * EXTBLAS_TYPE( sparse_vector );
7242
*
7343
* @returns An #extblas_sparse_vector that is under construction.
7444
*/
75-
EXTBLAS_TYPE( sparse_vector ) EXTBLAS_FUN( dusv_begin )( const int n );
45+
extblas_sparse_vector EXTBLAS_dusv_begin( const int n );
7646

7747
/**
7848
* Inserts a new nonzero entry into a sparse vector that is under construction.
@@ -90,8 +60,8 @@ EXTBLAS_TYPE( sparse_vector ) EXTBLAS_FUN( dusv_begin )( const int n );
9060
*
9161
* This is an implementation-specific extension.
9262
*/
93-
int EXTBLAS_FUN( dusv_insert_entry )(
94-
EXTBLAS_TYPE( sparse_vector ) x,
63+
int EXTBLAS_dusv_insert_entry(
64+
extblas_sparse_vector x,
9565
const double val,
9666
const int index
9767
);
@@ -108,7 +78,7 @@ int EXTBLAS_FUN( dusv_insert_entry )(
10878
*
10979
* This is an implementation-specific extension.
11080
*/
111-
int EXTBLAS_FUN( dusv_end )( EXTBLAS_TYPE( sparse_vector ) x );
81+
int EXTBLAS_dusv_end( extblas_sparse_vector x );
11282

11383
/**
11484
* Destroys the given sparse vector.
@@ -122,7 +92,7 @@ int EXTBLAS_FUN( dusv_end )( EXTBLAS_TYPE( sparse_vector ) x );
12292
*
12393
* This is an implementation-specific extension.
12494
*/
125-
int EXTBLAS_FUN( dusvds )( EXTBLAS_TYPE( sparse_vector ) x );
95+
int EXTBLAS_dusvds( extblas_sparse_vector x );
12696

12797
/**
12898
* Retrieves the number of nonzeroes in a given finalised sparse vector.
@@ -137,7 +107,7 @@ int EXTBLAS_FUN( dusvds )( EXTBLAS_TYPE( sparse_vector ) x );
137107
*
138108
* This is an implementation-specific extension.
139109
*/
140-
int EXTBLAS_FUN( dusv_nz )( const EXTBLAS_TYPE( sparse_vector ) x, int * nz );
110+
int EXTBLAS_dusv_nz( const extblas_sparse_vector x, int * nz );
141111

142112
/**
143113
* Opens a sparse vector for read-out.
@@ -154,7 +124,7 @@ int EXTBLAS_FUN( dusv_nz )( const EXTBLAS_TYPE( sparse_vector ) x, int * nz );
154124
*
155125
* This is an implementation-specific extension.
156126
*/
157-
int EXTBLAS_FUN( dusv_open )( const EXTBLAS_TYPE( sparse_vector ) x );
127+
int EXTBLAS_dusv_open( const extblas_sparse_vector x );
158128

159129
/**
160130
* Retrieves a sparse vector entry.
@@ -184,8 +154,8 @@ int EXTBLAS_FUN( dusv_open )( const EXTBLAS_TYPE( sparse_vector ) x );
184154
*
185155
* This is an implementation-specific extension.
186156
*/
187-
int EXTBLAS_FUN( dusv_get )(
188-
const EXTBLAS_TYPE( sparse_vector ) x,
157+
int EXTBLAS_dusv_get(
158+
const extblas_sparse_vector x,
189159
double * const val, int * const ind
190160
);
191161

@@ -200,7 +170,7 @@ int EXTBLAS_FUN( dusv_get )(
200170
*
201171
* This is an implementation-specific extension.
202172
*/
203-
int EXTBLAS_FUN( dusv_close )( const EXTBLAS_TYPE( sparse_vector ) x );
173+
int EXTBLAS_dusv_close( const extblas_sparse_vector x );
204174

205175
/**
206176
* Removes all entries from a finalised sparse vector.
@@ -213,9 +183,7 @@ int EXTBLAS_FUN( dusv_close )( const EXTBLAS_TYPE( sparse_vector ) x );
213183
*
214184
* This is an implementation-specific extension.
215185
*/
216-
int EXTBLAS_FUN( dusv_clear )( EXTBLAS_TYPE( sparse_vector ) x );
217-
218-
/**@}*/ // end doxygen grouping for SPARSEBLAS
186+
int EXTBLAS_dusv_clear( extblas_sparse_vector x );
219187

220188
#ifdef __cplusplus
221189
} // end extern "C"

0 commit comments

Comments
 (0)