Skip to content

Commit 69d38a6

Browse files
committed
Removed temporary solutions for preparing PR
1 parent da6be34 commit 69d38a6

8 files changed

Lines changed: 11 additions & 43 deletions

File tree

cubool/include/cubool/cubool.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -926,20 +926,20 @@ CUBOOL_EXPORT CUBOOL_API cuBool_Status cuBool_Kronecker(
926926
);
927927

928928
/**
929-
* Performs result = left + ~right, where
930-
* '+' is boolean semiring 'or' operation
929+
* Performs result = left * ~right, where
930+
* '*' is boolean semiring 'and' operation
931931
* '~' is operation for invert matrix (0 swaps to 1 and 1 to 0)
932932
*
933-
* @note Matrices must be compatible
933+
* @note To perform this operation matrices must be compatible
934+
* dim(left) = M x T
935+
* dim(right) = T x N
934936
* dim(result) = M x N
935-
* dim(left) = M x N
936-
* dim(right) = M x N
937937
*
938938
* @note Pass `CUBOOL_HINT_TIME_CHECK` hint to measure operation time
939939
*
940940
* @param result[out] Destination matrix to store result
941-
* @param left Source matrix to be added
942-
* @param right Source matrix to be inverted and added
941+
* @param left Source matrix to be multiplied
942+
* @param right Source matrix to be inverted and multiplied
943943
* @param hints Hints for the operation
944944
*
945945
* @return Error code on this operation

cubool/sources/core/matrix.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,21 +370,19 @@ namespace cubool {
370370
msk->commitCache();
371371
this->releaseCache();
372372

373-
/*
374373
if (checkTime) {
375-
TIMER_ACTION(timer, mHnd->eWiseMult(*a->mHnd, *b->mHnd, false));
374+
TIMER_ACTION(timer, mHnd->eWiseMultInverted(*mat->mHnd, *msk->mHnd, false));
376375

377376
LogStream stream(*Library::getLogger());
378377
stream << Logger::Level::Info
379378
<< "Time: " << timer.getElapsedTimeMs() << " ms "
380-
<< "Matrix::eWiseMult: "
379+
<< "Matrix::eWiseMultInverted: "
381380
<< this->getDebugMarker() << " = "
382-
<< a->getDebugMarker() << " + "
383-
<< b->getDebugMarker() << LogStream::cmt;
381+
<< mat->getDebugMarker() << " + "
382+
<< msk->getDebugMarker() << LogStream::cmt;
384383

385384
return;
386385
}
387-
*/
388386

389387
mHnd->eWiseMultInverted(*mat->mHnd, *msk->mHnd, false);
390388
}

cubool/sources/cuda/kernels/spmerge.cuh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ namespace cubool {
104104
MatrixType operator()(const MatrixType& a, const MatrixType& b) {
105105
auto aNvals = a.m_vals;
106106
auto bNvals = b.m_vals;
107-
// auto worst = std::min(aNvals, bNvals);
108107
auto worst = aNvals + bNvals;
109108

110109
// Allocate memory for the worst case scenario

cubool/tests/test_matrix_ewisemult_inverted.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,6 @@
44

55
using DataMatrix = std::vector<std::vector<int>>;
66

7-
static void printTestingMatrix(const testing::Matrix &matrix, std::string name = "") {
8-
if (name != "") {
9-
std::cout << name << std::endl;
10-
}
11-
12-
for (int i = 0; i < matrix.nvals; i++) {
13-
printf("(%d, %d)\n", matrix.rowsIndex[i], matrix.colsIndex[i]);
14-
}
15-
}
16-
17-
static void printCuboolMatrix(cuBool_Matrix matrix, std::string name = "") {
18-
if (name != "") {
19-
std::cout << name << std::endl;
20-
}
21-
22-
cuBool_Index nvals;
23-
cuBool_Matrix_Nvals(matrix, &nvals);
24-
std::vector<cuBool_Index> rows(nvals), cols(nvals);
25-
cuBool_Matrix_ExtractPairs(matrix, rows.data(), cols.data(), &nvals);
26-
27-
for (int i = 0; i < nvals; i++) {
28-
printf("(%d, %d)\n", rows[i], cols[i]);
29-
}
30-
}
31-
327
void testApplyNotMask(const DataMatrix &matrix_data, const DataMatrix &mask_data) {
338
cuBool_Index nrows, ncols;
349
nrows = matrix_data.size();

deps/nsparse-um/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ project(nsparse_um LANGUAGES CXX CUDA)
33

44
add_library(nsparse_um INTERFACE)
55
target_include_directories(nsparse_um INTERFACE include/)
6-
# target_link_libraries(nsparse_um INTERFACE cub)
76
target_link_libraries(nsparse_um INTERFACE)
87
target_compile_options(nsparse_um INTERFACE $<$<COMPILE_LANGUAGE:CUDA>: --expt-relaxed-constexpr --expt-extended-lambda>)
98

deps/nsparse-um/include/nsparse/unified_allocator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <thrust/detail/config.h>
44
#include <thrust/device_ptr.h>
55
#include <thrust/mr/allocator.h>
6-
// #include <thrust/memory/detail/device_system_resource.h>
76

87
#include <limits>
98
#include <stdexcept>

deps/nsparse-um/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ project(nsparse_um_test CXX CUDA)
33

44
add_executable(${PROJECT_NAME} src/nsparse_test.cu src/utils.cpp)
55

6-
# target_link_libraries(${PROJECT_NAME} PRIVATE gtest_main nsparse_um cub)
76
target_link_libraries(${PROJECT_NAME} PRIVATE gtest_main nsparse_um)
87
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
98

deps/nsparse/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.11)
22
project(nsparse_test CXX CUDA)
33

44
add_executable(${PROJECT_NAME} src/nsparse_test.cu src/utils.cpp)
5-
# target_link_libraries(${PROJECT_NAME} PRIVATE gtest_main nsparse cub)
65
target_link_libraries(${PROJECT_NAME} PRIVATE gtest_main nsparse)
76
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
87

0 commit comments

Comments
 (0)