Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move OMM Declarations to Respective Header Files #65

Merged
merged 5 commits into from
Apr 21, 2022
Merged
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 examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ list(
"tiled_householder_blr_qr"
"blocked_mgs_h_qr"
"h_lu"
"kernel-test"
"Hmatrix_to_json"
)
foreach(EXECUTABLE ${EXECUTABLES})
add_executable(${EXECUTABLE} ${EXECUTABLE}.cpp)
Expand Down
34 changes: 34 additions & 0 deletions examples/Hmatrix_to_json.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "hicma/hicma.h"

#include <cassert>
#include <cstdint>
#include <tuple>
#include <vector>
#include <iostream>
#include <fstream>

using namespace hicma;
using namespace std;

int main(int argc, char** argv) {
timing::start("Overall");
hicma::initialize();

const int64_t N = argc > 1 ? atoi(argv[1]) : 128;
const int64_t nleaf = argc > 2 ? atoi(argv[2]) : 32;
const double eps = argc > 3 ? atof(argv[3]) : 1e-6;
const int64_t admis = argc > 4 ? atoi(argv[4]) : 0;
const int64_t nblocks = 2;
const std::vector<std::vector<double>> randx{ get_sorted_random_vector(N) };

print("Generate hicma laplace 1D.");
timing::start("Hierarchical compression");
const Hierarchical A(laplacend, randx, N, N, nleaf, eps, admis, nblocks, nblocks, AdmisType::PositionBased);
timing::stopAndPrint("Hierarchical compression");
write_JSON(A, std::string("laplace1d-") + std::to_string(N) + std::string("-") +
std::to_string(nleaf) + std::string("-") +
std::to_string(eps) + std::string("-") +
std::to_string(admis) + std::string(".json"));
timing::stopAndPrint("Overall");
return 0;
}
125 changes: 0 additions & 125 deletions examples/gemm_gpu.cu

This file was deleted.

46 changes: 0 additions & 46 deletions examples/kernel-test.cpp

This file was deleted.

152 changes: 0 additions & 152 deletions examples/rsvd_gpu.cu

This file was deleted.

13 changes: 13 additions & 0 deletions include/hicma/definitions.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
#ifndef hicma_definitions_h
#define hicma_definitions_h

#include <cstdint>
#include <tuple>
#include <vector>


namespace hicma {

class MatrixProxy;
class Dense;

// NOTE These typedefs are necessary since yomm macros use commas to parse the
// function signature, so type tuples cannot be defined.
typedef std::tuple<MatrixProxy, MatrixProxy> MatrixPair;
typedef std::tuple<Dense, Dense> DensePair;
typedef std::tuple<Dense, Dense, Dense> DenseTriplet;
typedef std::tuple<Dense, std::vector<int64_t>> DenseIndexSetPair;
typedef std::tuple<double, double> DoublePair;

enum class MatrixLayout { RowMajor, ColumnMajor };
enum class Side { Left, Right };
enum class Mode { Upper, Lower };
Expand Down
Loading