资源简介
Eigen,2018年11月22日最新的稳定版本3.3.5
代码片段和文件信息
// This file is part of Eigen a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2015 Benoit Jacob
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file You can obtain one at http://mozilla.org/MPL/2.0/.
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int default_precision = 4;
// see --only-cubic-sizes
bool only_cubic_sizes = false;
// see --dump-tables
bool dump_tables = false;
uint8_t log2_pot(size_t x) {
size_t l = 0;
while (x >>= 1) l++;
return l;
}
uint16_t compact_size_triple(size_t k size_t m size_t n)
{
return (log2_pot(k) << 8) | (log2_pot(m) << 4) | log2_pot(n);
}
// just a helper to store a triple of KMN sizes for matrix product
struct size_triple_t
{
uint16_t k m n;
size_triple_t() : k(0) m(0) n(0) {}
size_triple_t(size_t _k size_t _m size_t _n) : k(_k) m(_m) n(_n) {}
size_triple_t(const size_triple_t& o) : k(o.k) m(o.m) n(o.n) {}
size_triple_t(uint16_t compact)
{
k = 1 << ((compact & 0xf00) >> 8);
m = 1 << ((compact & 0x0f0) >> 4);
n = 1 << ((compact & 0x00f) >> 0);
}
bool is_cubic() const { return k == m && m == n; }
};
ostream& operator<<(ostream& s const size_triple_t& t)
{
return s << “(“ << t.k << “ “ << t.m << “ “ << t.n << “)“;
}
struct inputfile_entry_t
{
uint16_t product_size;
uint16_t pot_block_size;
size_triple_t nonpot_block_size;
float gflops;
};
struct inputfile_t
{
enum class type_t {
unknown
all_pot_sizes
default_sizes
};
string filename;
vector entries;
type_t type;
inputfile_t(const string& fname)
: filename(fname)
type(type_t::unknown)
{
ifstream stream(filename);
if (!stream.is_open()) {
cerr << “couldn‘t open input file: “ << filename << endl;
exit(1);
}
string line;
while (getline(stream line)) {
if (line.empty()) continue;
if (line.find(“BEGIN MEASUREMENTS ALL POT SIZES“) == 0) {
if (type != type_t::unknown) {
cerr << “Input file “ << filename << “ contains redundant BEGIN MEASUREMENTS lines“;
exit(1);
}
type = type_t::all_pot_sizes;
continue;
}
if (line.find(“BEGIN MEASUREMENTS DEFAULT SIZES“) == 0) {
if (type != type_t::unknown) {
cerr << “Input file “ << filename << “ contains redundant BEGIN MEASUREMENTS lines“;
exit(1);
}
type = type_t::default_sizes;
continue;
}
if (type == type_t::unknown) {
continue;
}
switch(type) {
case type_t::all_pot_sizes: {
unsigned int product_size block_size;
float gf
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 180 2018-07-23 17:33 eigen-3.3.5\.hgeol
文件 244 2018-07-23 17:33 eigen-3.3.5\.hgignore
文件 1750 2018-07-23 17:33 eigen-3.3.5\.hgtags
文件 117 2018-07-23 17:33 eigen-3.3.5\.hg_archival.txt
文件 28983 2018-07-23 17:33 eigen-3.3.5\bench\analyze-blocking-sizes.cpp
文件 1421 2018-07-23 17:33 eigen-3.3.5\bench\basicbench.cxxlist
文件 1107 2018-07-23 17:33 eigen-3.3.5\bench\basicbenchmark.cpp
文件 1669 2018-07-23 17:33 eigen-3.3.5\bench\basicbenchmark.h
文件 6313 2018-07-23 17:33 eigen-3.3.5\bench\benchBlasGemm.cpp
文件 3534 2018-07-23 17:33 eigen-3.3.5\bench\benchCholesky.cpp
文件 5788 2018-07-23 17:33 eigen-3.3.5\bench\benchEigenSolver.cpp
文件 2806 2018-07-23 17:33 eigen-3.3.5\bench\benchFFT.cpp
文件 3598 2018-07-23 17:33 eigen-3.3.5\bench\benchGeometry.cpp
文件 22259 2018-07-23 17:33 eigen-3.3.5\bench\benchmark-blocking-sizes.cpp
文件 790 2018-07-23 17:33 eigen-3.3.5\bench\benchmark.cpp
文件 835 2018-07-23 17:33 eigen-3.3.5\bench\benchmarkSlice.cpp
文件 640 2018-07-23 17:33 eigen-3.3.5\bench\benchmarkX.cpp
文件 605 2018-07-23 17:33 eigen-3.3.5\bench\benchmarkXcwise.cpp
文件 1209 2018-07-23 17:33 eigen-3.3.5\bench\benchmark_suite
文件 3932 2018-07-23 17:33 eigen-3.3.5\bench\BenchSparseUtil.h
文件 4392 2018-07-23 17:33 eigen-3.3.5\bench\BenchTimer.h
文件 2529 2018-07-23 17:33 eigen-3.3.5\bench\BenchUtil.h
文件 5193 2018-07-23 17:33 eigen-3.3.5\bench\benchVecAdd.cpp
文件 10821 2018-07-23 17:33 eigen-3.3.5\bench\bench_gemm.cpp
文件 618 2018-07-23 17:33 eigen-3.3.5\bench\bench_multi_compilers.sh
文件 11652 2018-07-23 17:33 eigen-3.3.5\bench\bench_norm.cpp
文件 2159 2018-07-23 17:33 eigen-3.3.5\bench\bench_reverse.cpp
文件 320 2018-07-23 17:33 eigen-3.3.5\bench\bench_sum.cpp
文件 651 2018-07-23 17:33 eigen-3.3.5\bench\bench_unrolling
文件 3374 2018-07-23 17:33 eigen-3.3.5\bench\btl\actions\action_aat_product.hh
............此处省略1709个文件信息
- 上一篇:最新版 .net reactor 5.0.0 破解版
- 下一篇:最全常用元器件封装库
评论
共有 条评论