Skip to content

Commit

Permalink
Merge pull request #65 from rioyokotalab/62-minor-cleanup
Browse files Browse the repository at this point in the history
Move OMM Declarations to Respective Header Files
  • Loading branch information
wawando authored Apr 21, 2022
2 parents 6e7f6a4 + 58d9726 commit 2356029
Show file tree
Hide file tree
Showing 39 changed files with 297 additions and 651 deletions.
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

0 comments on commit 2356029

Please sign in to comment.