Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: ubuntu-22.04


# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: ctest -V

test_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:


test_header_only:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:


test_opt_dep:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else()
cmake_policy(VERSION 3.18)
endif()

project( SparseBase_project VERSION 0.2.4 )
project( SparseBase_project VERSION 0.3.1 )
option(RUN_TESTS "Enable running tests" OFF)
option(_HEADER_ONLY "Use the library as a header only library?" OFF)
option(USE_CUDA "Enable CUDA" OFF)
Expand Down
47 changes: 24 additions & 23 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/run_all_examples.py
${CMAKE_CURRENT_BINARY_DIR}/run_all_examples.py
COPYONLY
${CMAKE_CURRENT_SOURCE_DIR}/run_all_examples.py
${CMAKE_CURRENT_BINARY_DIR}/run_all_examples.py
COPYONLY
)

file(COPY ${CMAKE_SOURCE_DIR}/examples/data DESTINATION ${CMAKE_BINARY_DIR}/examples/)

if (${USE_CUDA})
add_subdirectory(cuda_example)
add_subdirectory(array_example)
add_subdirectory(example_experiment)
endif()
if(NOT ${_HEADER_ONLY} OR NOT ${USE_CUDA})
add_subdirectory(csr_coo)
add_subdirectory(degree_order)
add_subdirectory(custom_order)
add_subdirectory(format_conversion)
add_subdirectory(rcm_order)
add_subdirectory(sparse_feature)
add_subdirectory(sparse_reader)
add_subdirectory(custom_format)
add_subdirectory(custom_converter)
add_subdirectory(custom_experiment)
add_subdirectory(linear_solver)
add_subdirectory(cuda_example)
add_subdirectory(array_example)
add_subdirectory(example_experiment)
endif ()
if (NOT ${_HEADER_ONLY} OR NOT ${USE_CUDA})
add_subdirectory(csr_coo)
add_subdirectory(degree_order)
add_subdirectory(custom_order)
add_subdirectory(format_conversion)
add_subdirectory(rcm_order)
add_subdirectory(sparse_feature)
add_subdirectory(sparse_reader)
add_subdirectory(custom_format)
add_subdirectory(custom_converter)
add_subdirectory(custom_experiment)
add_subdirectory(linear_solver)
add_subdirectory(download_module)

if(${USE_METIS})
add_subdirectory(metis_partition)
endif()
if (${USE_METIS})
add_subdirectory(metis_partition)
endif ()

endif()
endif ()
2 changes: 2 additions & 0 deletions examples/download_module/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_executable(download_module ${CMAKE_CURRENT_SOURCE_DIR}/download_module.cc)
target_link_libraries(download_module sparsebase)
51 changes: 51 additions & 0 deletions examples/download_module/download_module.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#include <sparsebase/io/download_extract.h>

#include <iostream>
#include <string>

#include "sparsebase/format/format.h"

using namespace std;

int main(int argc, char *argv[]) {
unordered_map<string, sparsebase::format::Format *> alternative_res;

sparsebase::io::SuiteSparseDownloader ssd(
"https://suitesparse-collection-website.herokuapp.com/MM/Meszaros/"
"p010.tar.gz");
alternative_res = ssd.download();

for (auto &res : alternative_res) {
auto format = res.second->get_dimensions()[0];
cout << res.first << " -- " << format << "\n";
}

sparsebase::io::SnapDownloader sd(
"http://snap.stanford.edu/data/p2p-Gnutella05.txt.gz");

alternative_res = sd.download();

for (auto &res : alternative_res) {
auto format = res.second->get_dimensions()[0];
cout << res.first << " -- " << format << "\n";
}

sparsebase::io::NetworkRepositoryDownloader nrd(
"https://nrvis.com/download/data/asn/"
"aves-barn-swallow-contact-network.zip");
alternative_res = nrd.download();

for (auto &res : alternative_res) {
auto format = res.second->get_dimensions()[0];
cout << res.first << " -- " << format << "\n";
}

sparsebase::io::NetworkRepositoryDownloader nrd2(
"https://nrvis.com/download/data/misc/1138_bus.zip");
alternative_res = nrd2.download();

for (auto &res : alternative_res) {
auto format = res.second->get_dimensions()[0];
cout << res.first << " -- " << format << "\n";
}
}
Loading