Merge pull request 'dev' (#3) from dev into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Reviewed-on: chizeta/CNORXZ#3
This commit is contained in:
Christian Zimmermann 2024-02-03 23:49:58 +00:00
commit e392db5fdc
115 changed files with 1231 additions and 709 deletions

View file

@ -1,11 +1,13 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(cnorxz)
# LIB VERSION
set(VERSION_PART "pre")
set(VERSION_TAG_HASH "6857e3fc7d0af25db3a925791d1cabc6342b930a")
set(V_MAJOR 0)
set(V_MINOR 0)
set(V_PATCH 0)
set(VERSION "${V_MAJOR}.${V_MINOR}.${V_PATCH}")
# OPTIONS
@ -20,21 +22,13 @@ include(cmake/check_avx.cmake)
execute_process(COMMAND bash "-c" "git rev-parse HEAD" OUTPUT_VARIABLE GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND bash "-c" "git rev-parse --abbrev-ref HEAD" OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
# BUILD / CHECK VERSION STRING
# BUILD VERSION STRING
message(STATUS "${GIT_HASH}")
message(STATUS "${VERSION_PART}")
message(STATUS "${VERSION_TAG_HASH}")
set(VERSION "${VERSION_PART}")
message(STATUS "git hash = ${GIT_HASH}")
message(STATUS "git branch = ${GIT_BRANCH}")
if(NOT ("${GIT_BRANCH}" EQUAL "release"))
if(NOT ("${GIT_HASH}" EQUAL "${VERSION_TAG_HASH}"))
string(SUBSTRING ${GIT_HASH} 0 7 GIT_HASH_SHORT)
set(VERSION "${VERSION}-${GIT_BRANCH}-${GIT_HASH_SHORT}")
endif()
else()
if(NOT ("${GIT_HASH}" EQUAL "${VERSION_TAG_HASH}"))
message(FATAL_ERROR "version mash-up, do not use, contact maintainer")
endif()
string(SUBSTRING ${GIT_HASH} 0 7 GIT_HASH_SHORT)
set(VERSION "${VERSION}-${GIT_BRANCH}-${GIT_HASH_SHORT}")
endif()
message(STATUS "version = ${VERSION}")

View file

@ -1,10 +1,12 @@
# Container with Native Operation Routines by XZ (CNORXZ)
# Container with Native Operation Routines and Expressions (CNORXZ)
(as always, the name was there before the acronym)
![Image](./cnorxz_logo.png)
## Description
This library provides a framework for handling multi dimensional containers, their meta data, and several kinds of operations on one or more of them.
This library provides a framework for handling multi dimensional data containers (arrays or array-like types), their meta data, and several kinds of operations on one or more of them.
## Build instructions
@ -72,5 +74,75 @@ Finally, there are the container classes (arrays), which are derived from `CArra
#### Expressions and Operations
In the context of this library, *expressions* are classes representing an expression that is supposed to be executed at given points during an iteration proceedure that involves one or more indexed quantities. Each expression type must fulfill the following requirements:
* There must be an implementation of `operator()` taking a multi-position argument indicating the position for the current iteration of each involved object according to its indices. The function can have an expression defined return value, which can be further processed.
* There must be an implementation of `rootSteps()` taking an index ID as argument. The function should return jump sizes for each involved object corresponding to the given index.
Each expression `Xpr` should be derived from the class `XprInterface<Xpr>`, where `Xpr` is a recurring template argument (static polymorphism).
There are two important expression types:
* *For* expressions: They represent a for loop over a given index.
* *Operations*: They correspond to one or more indexed array types and given operation on or between them. If an operation handles nothing but the access to one single array, it is called *Operation* *Root*.
Example:
```cpp
#include "cnroxz.h"
using namespace CNORZX;
RangePtr r = CRangeFactory(3).create(); // [0,1,2]
RangePtr s = CRangeFactory(5).create(); // [0,1,2,3,4]
RangePtr t = URangeFactory<Int>(Vector<Int>{4,5,6}).create(); // [4,5,6]
i = std::make_shared<CIndex>(r);
j = std::make_shared<CIndex>(s);
k = std::make_shared<UIndex<Int>>(t);
MArray<Double> a(r*s*t); // 3-dim array, dimensions = [3,5,3], size = 45
MArray<Double> b(r*t); // 2-dim array, dimensions = [3,3], size = 9
MArray<Double> c(s*t); // 2-dim array, dimensions = [3,5], size = 15
// set array element values of a,b,c here...
c(j*k) += ( a(i*j*k) * b(j*k) * xpr(k) ).c(i);
/* Explanation of the above line:
c(j*k), a(i*j*k), b(j*k) and xpr(k) are operation roots, i.e.
they manage access to the arrays c,a,b and the meta data space of index k
The operations between the operation roots are also operations in the
sense of this nomenclature, i.e. a(i*j*k) * b(j*k) is again an operation.
The operation member function c() creates contraction, i.e. a for loop
over the given index (i). If no further functions are specified, the values
returned by the underlying operations are summed up for equivalent index
combinations.
The += invokes a for loop over the indices on the l.h.s.. The values returned
by the expression on the r.h.s. are added to the l.h.s. Something similar could be done
with a = operator. Then the values would just be assigned instead of added.
*/
// Equivalent C-stype for loop (if a,b,c were C-style arrays):
for(size_t j = 0; j < s; ++j){
for(size_t k = 0; k < t; ++k){
int kv = k+4;
double x = 0;
// the contraction part:
for(size_t i = 0; i < r; ++i){
x += a[i*s*t+j*t+k] * b[j*t+k] * kv;
}
c[j*t+k] += x;
}
}
```
...

31
TODO
View file

@ -1,19 +1,14 @@
include/operation/op_types.cc.h@173: "build and execute assign expression forwarding outer index" [long]
include/operation/op_types.cc.h@446: "TODO: implement ifor with func arg" [long]
include/array/array_base.cc.h@35: "TODO: check if container format is trivial" [check]
include/array/array_base.cc.h@120: "TODO: check if container format is trivial" [check]
include/array/array_base.cc.h@164: "check further compatibility of index/range format" [check]
include/array/array_base.cc.h@319: "check further compatibility of index/range format" [check]
include/base/dtype.cc.h@23: "for tuple use vector<DType>" [comment]
include/ranges/index_base.cc.h@110: "if this assert never applies, remove mPtrId (-> Defaults)" [long]
include/ranges/mrange.cc.h@633: "TODO: ZRange (meta and index pos static!)" [long]
include/ranges/urange.cc.h@366: "else general transform using DType (better than nothing), to be implemented" [urgent]
include/ranges/urange.cc.h@430: "else general transform using DType (better than nothing), to be implemented" [urgent]
include/xpr/for.cc.h@314: "check for write access" [check]
include/ranges/srange.cc.h@292: "TODO: check for selected static sizes of SRange -> return SRange" [long]
lib/ranges/crange.cc@114: "preliminary solution (TODO: implement xpr that simply returns PosT value)" [long]
opt/hdf5/lib/h5_group.cc@166: "IMPLEMENT" [urgent]
opt/hdf5/include/h5_group.cc.h@34: "not implemented" [urgent]
opt/hdf5/lib/h5_table.cc@127: "not implemented" [urgent]
include/operation/op_types.cc.h@225: "build and execute assign expression forwarding outer index"
include/operation/op_types.cc.h@498: "implement ifor with func arg"
opt/hdf5/include/h5_content_base.h@23: "IO save error handling"
opt/hdf5/lib/h5_dataset.cc@124: "all sub-ranges explicity"
lib/ranges/crange.cc@94: "preliminary solution (TODO: implement xpr that simply returns PosT value)"
include/ranges/srange.cc.h@307: "check for selected static sizes of SRange -> return SRange"
include/xpr/for.cc.h@324: "check for write access"
include/base/dtype.cc.h@23: "for tuple use vector<DType>"
include/ranges/urange.cc.h@384: "else general transform using DType (better than nothing), to be implemented"
include/ranges/urange.cc.h@448: "else general transform using DType (better than nothing), to be implemented"
include/array/array_base.cc.h@184: "check further compatibility of index/range format"
include/array/array_base.cc.h@376: "check further compatibility of index/range format"
include/ranges/index_base.cc.h@109: "if this assert never applies, remove mPtrId (-> Defaults)"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

@ -54,14 +54,14 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "Container with Native Operation Routines (by XZ)"
PROJECT_BRIEF = "Container with Native Operation Routines and Expressions"
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO =
PROJECT_LOGO = "cnorxz_logo_mini.png"
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
@ -518,7 +518,7 @@ TIMESTAMP = NO
# normally produced when WARNINGS is set to YES.
# The default value is: NO.
EXTRACT_ALL = NO
EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
@ -542,7 +542,7 @@ EXTRACT_PACKAGE = NO
# included in the documentation.
# The default value is: NO.
EXTRACT_STATIC = NO
EXTRACT_STATIC = YES
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO,
@ -1269,7 +1269,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
HTML_HEADER = "header.html"
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
@ -1319,7 +1319,7 @@ HTML_EXTRA_STYLESHEET =
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES =
HTML_EXTRA_FILES = "cnorxz_logo_mini.png"
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
# should be rendered with a dark or light theme.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

36
doc/doxy/header.html Normal file
View file

@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CNORXZ: Container with Native Operation Routines and Expressions (CNORXZ)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<link rel="icon" href="$relpath^cnorxz_logo_mini.png" type="image/x-icon" />
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="cnorxz_logo_mini.png"/></td>
<td id="projectalign">
<div id="projectname">CNORXZ
</div>
<div id="projectbrief">Container with Native Operation Routines and Expressions</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file bin/config.cc
@brief Program for printing cnorxz configurations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include <cstdlib>
#include <iostream>

View file

@ -2,10 +2,9 @@
/**
@file include/array/aindex.cc.h
@brief ...
@brief Array index template implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/aindex.h
@brief ...
@brief Array index declaration.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/array.cc.h
@brief ...
@brief Array main header for template implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/array.h
@brief ...
@brief Array main header.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/array_base.cc.h
@brief ...
@brief Array base class template implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -182,7 +181,6 @@ namespace CNORXZ
typename CArrayBase<T>::const_iterator CArrayBase<T>::itLexSave(const Acc& acc) const
{
CXZ_ASSERT(acc.lex() < this->size(), "index out of range");
//CXZ_ASSERT(false, "IMPLEMENT CHECKS!!");
// check further compatibility of index/range format!!!
return begin() + acc.lex();
}
@ -375,7 +373,6 @@ namespace CNORXZ
typename ArrayBase<T>::iterator ArrayBase<T>::itLexSave(const Acc& acc)
{
CXZ_ASSERT(acc.lex() < this->size(), "index out of range");
//CXZ_ASSERT(false, "IMPLEMENT CHECKS!!");
// check further compatibility of index/range format!!!
return begin() + acc.lex();
}

View file

@ -2,10 +2,9 @@
/**
@file include/array/array_base.h
@brief ...
@brief Array base class declarations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/marray.cc.h
@brief ...
@brief MArray implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/marray.h
@brief ...
@brief MArray declarations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/slice.cc.h
@brief ...
@brief Slice implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/array/slice.h
@brief ...
@brief Slice declarations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,11 +2,11 @@
/**
@file include/base/config.h
@brief runtime config functions
@brief Runtime config functions declarations.
Declare functions returning version and configuration infos
Declare functions returning version and configuration infos.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,9 +2,9 @@
/**
@file include/base/to_string.h
@brief String converter
@brief String converter declarations.
Declaration of functions that convert a given object/type to a string
Declaration of functions that convert a given object/type to a string.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de

View file

@ -84,7 +84,7 @@ namespace CNORXZ
| library types |
+===================*/
/***
/*
Naming Prefixes:
D = Y = Dynamic
V = X = Virtual
@ -100,7 +100,7 @@ namespace CNORXZ
A = (const) Array
B = (mutable) Array
F = Functional, Map,...
***/
*/
// default template parameter
class None {};

View file

@ -2,7 +2,7 @@
/**
@file include/base/uuid.h
@brief uuid implementation
@brief cnorxz uuid declaration.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/cnorxz.cc.h
@brief cnorxz main template header
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "base/base.cc.h"
#include "memory/memory.cc.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/memory/allocator.cc.h
@brief Allocator template member function implementation
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_allocator_cc_h__
#define __cxz_allocator_cc_h__

View file

@ -1,11 +1,10 @@
// -*- C++ -*-
/**
@file include/memory/memcount.h
@brief ...
@file include/memory/allocator.h
@brief Allocator declaration
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/memory/memcount.h
@brief ...
@brief MemCount declaration.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/memory/memory.cc.h
@brief ...
@brief Memory template implementations main header.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/memory/memory.h
@brief ...
@brief Memory main heade.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/basic_operations.cc.h
@brief Basic operations implementation
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_basic_operations_cc_h__
#define __cxz_basic_operations_cc_h__
@ -6,9 +16,9 @@
namespace CNORXZ
{
/************************************
* standard operatrions (unary) *
************************************/
/*==================================+
| standard operatrions (unary) |
+==================================*/
template <class Op>
constexpr decltype(auto) minus(const COpInterface<Op>& op)
@ -16,9 +26,9 @@ namespace CNORXZ
return operation( [](const auto& a) { return -a; }, op.THIS() );
}
/*************************************
* standard operatrions (binary) *
*************************************/
/*===================================+
| standard operatrions (binary) |
+===================================*/
template <class Op1, class Op2>
constexpr decltype(auto) plus(const COpInterface<Op1>& op1, const COpInterface<Op2>& op2)
@ -55,9 +65,9 @@ namespace CNORXZ
op1.THIS(), op2.THIS() );
}
/*****************************************
* operators for standard operations *
*****************************************/
/*=======================================+
| operators for standard operations |
+=======================================*/
template <class Op>
constexpr decltype(auto) operator-(const COpInterface<Op>& op)

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/basic_operations.h
@brief Basic operations declaration
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_basic_operations_h__
#define __cxz_basic_operations_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/extensions/avx.cc.h
@brief Register type implementaions for AVX.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_avx_cc_h__
#define __cxz_avx_cc_h__
@ -6,9 +16,9 @@
namespace CNORXZ
{
/***********************
* PlusCC / PlusCX *
***********************/
/*=====================+
| PlusCC / PlusCX |
+=====================*/
inline decltype(auto)
PlusCC<Double,Double,AVX::ND>::eval(const Consecutive<Double,AVX::ND>& a,
@ -70,9 +80,9 @@ namespace CNORXZ
return o;
}
/*************************
* MinusCC / MinusCX *
*************************/
/*=======================+
| MinusCC / MinusCX |
+=======================*/
inline decltype(auto)
MinusCC<Double,Double,AVX::ND>::eval(const Consecutive<Double,AVX::ND>& a,
@ -134,9 +144,9 @@ namespace CNORXZ
return o;
}
/***********************************
* MultipliesCC / MultipliesCX *
***********************************/
/*=================================+
| MultipliesCC / MultipliesCX |
+=================================*/
inline decltype(auto)
MultipliesCC<Double,Double,AVX::ND>::eval(const Consecutive<Double,AVX::ND>& a,
@ -200,9 +210,9 @@ namespace CNORXZ
}
/*****************************
* DividesCC / DividesCX *
*****************************/
/*===========================+
| DividesCC / DividesCX |
+===========================*/
inline decltype(auto)
DividesCC<Double,Double,AVX::ND>::eval(const Consecutive<Double,AVX::ND>& a,

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/extensions/avx.h
@brief Register type specialization for AVX.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_avx_h__
#define __cxz_avx_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/extensions/extensions.cc.h
@brief Operation extensions template implementations main header.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_extensions_cc_h__
#define __cxz_extensions_cc_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/extensions/extensions.h
@brief Operation extensions main header.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_extensions_h__
#define __cxz_extensions_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/extensions/reg.cc.h
@brief Register type template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_reg_cc_h__
#define __cxz_reg_cc_h__
@ -110,9 +120,9 @@ namespace CNORXZ
return consecFuncAI<F,Dst,Args...>(f, dst, args..., std::make_index_sequence<N>{});
}
/******************************
* basic operations: plus *
******************************/
/*============================+
| basic operations: plus |
+============================*/
template <typename T, typename U, SizeT N>
constexpr decltype(auto)
@ -146,9 +156,9 @@ namespace CNORXZ
return consecFuncA<N>( [](auto& x, const auto& y) { return x += y; }, o, a );
}
/*******************************
* basic operations: minus *
*******************************/
/*=============================+
| basic operations: minus |
+=============================*/
template <typename T, typename U, SizeT N>
constexpr decltype(auto) MinusCC<T,U,N>::eval(const Consecutive<T,N>& a, const Consecutive<U,N>& b)
@ -180,9 +190,9 @@ namespace CNORXZ
return consecFuncA<N>( [](auto& x, const auto& y) { return x -= y; }, o, a );
}
/***********************************
* basic operations: muliplies *
***********************************/
/*=================================+
| basic operations: muliplies |
+=================================*/
template <typename T, typename U, SizeT N>
constexpr decltype(auto) MultipliesCC<T,U,N>::eval(const Consecutive<T,N>& a, const Consecutive<U,N>& b)
@ -214,9 +224,9 @@ namespace CNORXZ
return consecFuncA<N>( [](const auto& x, const auto& y) { return x *= y; }, o, a );
}
/*********************************
* basic operations: divides *
*********************************/
/*===============================+
| basic operations: divides |
+===============================*/
template <typename T, typename U, SizeT N>
constexpr decltype(auto) DividesCC<T,U,N>::eval(const Consecutive<T,N>& a, const Consecutive<U,N>& b)

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/extensions/reg.h
@brief Register type declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_reg_h__
#define __cxz_reg_h__
@ -33,9 +43,9 @@ namespace CNORXZ
template <typename T, SizeT N>
struct consecutive_size<Consecutive<T,N>> { static constexpr SizeT value = N; };
/****************************************
* consecutive generating functions *
****************************************/
/*======================================+
| consecutive generating functions |
+======================================*/
template <typename T, class EPosT, SizeT... Is>
inline decltype(auto) vregi(const T* d, const EPosT& pos, std::index_sequence<Is...> is);
@ -46,9 +56,9 @@ namespace CNORXZ
template <typename T, class EPosT>
inline decltype(auto) vreg(T* d, const EPosT& pos);
/******************
* ConsecFunc *
******************/
/*================+
| ConsecFunc |
+================*/
template <SizeT I, typename T>
constexpr decltype(auto) consecGet(const T& a);
@ -76,9 +86,9 @@ namespace CNORXZ
template <SizeT N, class F, typename Dst, typename... Args>
constexpr Dst& consecFuncA(const F& f, Dst& dst, const Args&... args);
/******************************
* basic operations: plus *
******************************/
/*============================+
| basic operations: plus |
+============================*/
template <typename T, typename U, SizeT N>
struct PlusCC
@ -123,9 +133,9 @@ namespace CNORXZ
constexpr Consecutive<T,N>& operator+=(Consecutive<T,N>& o, const U& a)
{ return PlusCX<T,U,N>::aeval(o,a); }
/*******************************
* basic operations: minus *
*******************************/
/*=============================+
| basic operations: minus |
+=============================*/
template <typename T, typename U, SizeT N>
struct MinusCC
@ -170,9 +180,9 @@ namespace CNORXZ
constexpr Consecutive<T,N>& operator-=(Consecutive<T,N>& o, const U& a)
{ return MinusCX<T,U,N>::eval(o,a); }
/***********************************
* basic operations: muliplies *
***********************************/
/*=================================+
| basic operations: muliplies |
+=================================*/
template <typename T, typename U, SizeT N>
struct MultipliesCC
@ -217,9 +227,9 @@ namespace CNORXZ
constexpr Consecutive<T,N>& operator*=(Consecutive<T,N>& o, const U& a)
{ return MultipliesCX<T,U,N>::eval(o,a); }
/*********************************
* basic operations: divides *
*********************************/
/*===============================+
| basic operations: divides |
+===============================*/
template <typename T, typename U, SizeT N>
struct DividesCC

View file

@ -1,9 +1,18 @@
// -*- C++ -*-
/**
@file include/operation/op_types.cc.h
@brief Operation types template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_op_types_cc_h__
#define __cxz_op_types_cc_h__
#include "op_types.h"
//#include "xpr/xpr.h"
#include "op_utility.h"
#include "extensions/extensions.h"

View file

@ -1,4 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/op_types.h
@brief Operation types declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_op_types_h__
#define __cxz_op_types_h__

View file

@ -1,10 +1,19 @@
// -*- C++ -*-
/**
@file include/operation/op_utility.cc.h
@brief Operation utilities template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_op_utility_cc_h__
#define __cxz_op_utility_cc_h__
#include "op_utility.h"
#include "xpr/pos_type.h"
//#include "operation/op_types.h"
namespace CNORXZ
{

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/op_utility.h
@brief Operation utilities declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_op_utility_h__
#define __cxz_op_utility_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/operation.cc.h
@brief Operation main header for template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "op_types.cc.h"
#include "op_utility.cc.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/operation/operation.h
@brief Operation main header.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "op_types.h"
#include "op_utility.h"

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/crange.cc.h
@brief ...
@brief CRange and CIndex template implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,8 +2,7 @@
/**
@file include/ranges/dindex.cc.h
@brief ...
@brief Dynamic index template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de

View file

@ -2,7 +2,7 @@
/**
@file include/ranges/dindex.h
@brief DIndex declaration
@brief Dynamic index declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/eindex.cc.h
@brief ...
@brief Extension index implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,8 +2,7 @@
/**
@file include/ranges/eindex.h
@brief ...
@brief Extension index declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/index_base.cc.h
@brief ...
@brief Index base template implementation.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -17,9 +16,9 @@
namespace CNORXZ
{
/**********************
* IndexInterface *
**********************/
/*====================+
| IndexInterface |
+====================*/
template <class I, typename MetaType>
IndexInterface<I,MetaType>::IndexInterface()
@ -113,9 +112,9 @@ namespace CNORXZ
}
/****************************
* Non-member functions *
****************************/
/*==========================+
| Non-member functions |
+==========================*/
template <class I, typename MetaType>
IndexPtr<I,MetaType>& operator++(const IndexPtr<I,MetaType>& i)

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/index_base.h
@brief ...
@brief Index base declaration.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -28,7 +27,7 @@ namespace CNORXZ
all indices are supposed to be derived from the corresponding
template instance
Indices are act as iterators over parameter spaces (ranges) and/or
Indices act as iterators over parameter spaces (ranges) and/or
the containers (arrays) defined on them
Moreover, indices are used to define operations on the

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/index_format.cc.h
@brief ...
@brief Index formats implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -17,9 +16,9 @@
namespace CNORXZ
{
/***************
* MFormat *
***************/
/*=============+
| MFormat |
+=============*/
template <SizeT N>
constexpr MFormat<N>::MFormat(const Arr<UPos,N>& b) :
@ -61,9 +60,9 @@ namespace CNORXZ
}
/****************
* GMFormat *
****************/
/*==============+
| GMFormat |
+==============*/
template <class... PosT>
constexpr GMFormat<PosT...>::GMFormat(const Tuple<PosT...>& b) :
@ -115,9 +114,9 @@ namespace CNORXZ
return GMFormat(std::move(std::make_tuple(ps...)));
}
/***************
* YFormat *
***************/
/*=============+
| YFormat |
+=============*/
template <class FormatT>
YFormat::YFormat(const FormatT& f) : mB(f.size())

View file

@ -2,8 +2,7 @@
/**
@file include/ranges/index_format.h
@brief ...
@brief Index formats declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de

View file

@ -2,8 +2,7 @@
/**
@file include/ranges/index_mul.cc.h
@brief ...
@brief Index multiplication template implementation.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
@ -18,9 +17,9 @@
namespace CNORXZ
{
/*********************
* MIndexSptrMul *
*********************/
/*===================+
| MIndexSptrMul |
+===================*/
template <class BlockT, class... Indices, class I, SizeT... Is>
decltype(auto) MIndexSptrMul::evalMX(const Sptr<GMIndex<BlockT,Indices...>>& a,
@ -52,9 +51,9 @@ namespace CNORXZ
}
/*****************
* operator* *
*****************/
/*===============+
| operator* |
+===============*/
template <class I1, typename Meta1, class I2, typename Meta2>
inline decltype(auto) operator*(const IndexInterface<I1,Meta1>& a,
@ -122,9 +121,9 @@ namespace CNORXZ
return a.mul(b);
}
/***************
* iptrMul *
***************/
/*=============+
| iptrMul |
+=============*/
template <class I1, class I2>
decltype(auto) iptrMul(const Sptr<I1>& a, const Sptr<I2>& b)

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/index_pack.cc.h
@brief ...
@brief Index pack template implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -17,9 +16,9 @@
namespace CNORXZ
{
/*************
* SPack *
*************/
/*===========+
| SPack |
+===========*/
template <class... Indices>
constexpr SPack<Indices...>::SPack(const Sptr<Indices>&... is) :
@ -96,9 +95,9 @@ namespace CNORXZ
return lex();
}
/**************************
* SPack (non-member) *
**************************/
/*========================+
| SPack (non-member) |
+========================*/
template <class... Indices>
constexpr decltype(auto) spack(const Indices&... inds)
@ -114,9 +113,9 @@ namespace CNORXZ
return SPack<Indices...>( inds... );
}
/*************
* DPack *
*************/
/*===========+
| DPack |
+===========*/
template <class... Indices>
DPack::DPack(const SPack<Indices...>& p) :
@ -127,9 +126,9 @@ namespace CNORXZ
{}
/**************************
* DPack (non-member) *
**************************/
/*========================+
| DPack (non-member) |
+========================*/
template <class... Indices>
DPack dpack(const Indices&... inds)

View file

@ -2,7 +2,7 @@
/**
@file include/ranges/index_pack.h
@brief Index pack declaration
@brief Index pack declarations.
Index packs are sets of indices. In contrast to multi-indices like
(G)MIndex or YIndex, there is no format that can be used to determine
@ -10,7 +10,7 @@
Nevertheless, a function pos() is implemented, which just returns
the same value as lex().
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,8 +2,7 @@
/**
@file include/ranges/lindex.cc.h
@brief ...
@brief LIndex implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/range_base.cc.h
@brief ...
@brief RangeBase template implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,12 +2,12 @@
/**
@file include/ranges/range_base.h
@brief RangeBase declaration
@brief RangeBase declaration.
Include basic headers containing defintions and macros
used throughout this library
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/ranges.cc.h
@brief ...
@brief Ranges template implementation main header
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/srange.cc.h
@brief ...
@brief SRange, SRangeFactory and SIndex implementation.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -18,9 +17,9 @@
namespace CNORXZ
{
/**************
* SIndex *
**************/
/*============+
| SIndex |
+============*/
template <typename MetaT, SizeT S>
SIndex<MetaT,S>::SIndex(const RangePtr& range, SizeT pos) :
@ -213,9 +212,9 @@ namespace CNORXZ
}
/*********************
* SRangeFactory *
*********************/
/*===================+
| SRangeFactory |
+===================*/
template <typename MetaType, SizeT S>
SRangeFactory<MetaType,S>::SRangeFactory(const Arr<MetaType,S>& space) :
@ -248,9 +247,9 @@ namespace CNORXZ
}
}
/**************
* SRange *
**************/
/*============+
| SRange |
+============*/
template <typename MetaType, SizeT S>
SRange<MetaType,S>::SRange(const Arr<MetaType,S>& space) :
@ -338,9 +337,9 @@ namespace CNORXZ
return Vector<Uuid> { this->id() };
}
/*******************
* Range Casts *
*******************/
/*=================+
| Range Casts |
+=================*/
template <typename MetaType, SizeT S>
Sptr<SRange<MetaType,S>> RangeCast<SRange<MetaType,S>>::func(const RangePtr& r)

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/urange.cc.h
@brief ...
@brief URange, URangeFactory and UIndex implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -25,9 +24,9 @@
namespace CNORXZ
{
/*****************
* UIndex *
*****************/
/*===============+
| UIndex |
+===============*/
template <typename MetaT>
UIndex<MetaT>::UIndex(const RangePtr& range, SizeT pos) :
@ -222,9 +221,9 @@ namespace CNORXZ
return iptrMul(a, b);
}
/**********************
* URangeFactory *
**********************/
/*====================+
| URangeFactory |
+====================*/
template <typename MetaT>
URangeFactory<MetaT>::URangeFactory(const Vector<MetaT>& space) :
@ -257,9 +256,9 @@ namespace CNORXZ
}
}
/***************
* URange *
***************/
/*=============+
| URange |
+=============*/
template <typename MetaT>
URange<MetaT>::URange(const Vector<MetaT>& space) :
@ -350,9 +349,9 @@ namespace CNORXZ
return Vector<Uuid> { this->id() };
}
/*******************
* Range Casts *
*******************/
/*=================+
| Range Casts |
+=================*/
template <typename MetaT>
struct URangeCast

View file

@ -2,10 +2,9 @@
/**
@file include/ranges/xindex.cc.h
@brief ...
@brief XIndexBase and XIndex template implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
@ -18,9 +17,9 @@
namespace CNORXZ
{
/**************
* XIndex *
**************/
/*============+
| XIndex |
+============*/
template <class Index, typename Meta>
XIndex<Index,Meta>::XIndex(const IndexPtr<Index,Meta>& i) :

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/buf_xpr.cc.h
@brief Buffer xpression template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "buf_xpr.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/buf_xpr.h
@brief Buffer xpression declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "xpr_base.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/for.cc.h
@brief For expressions template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_for_cc_h__
#define __cxz_for_cc_h__
@ -9,9 +19,9 @@
namespace CNORXZ
{
/***********
* For *
***********/
/*=========+
| For |
+=========*/
template <SizeT L, class Xpr, class F>
constexpr For<L,Xpr,F>::For(SizeT size, const IndexId<L>& id, const Xpr& xpr, F&& f) :
@ -73,9 +83,9 @@ namespace CNORXZ
return mXpr.rootSteps(id);
}
/************************
* For (non-member) *
************************/
/*======================+
| For (non-member) |
+======================*/
template <SizeT L, class Xpr, class F>
constexpr decltype(auto) mkFor(SizeT size, const IndexId<L>& id, const Xpr& xpr, F&& f)
@ -89,9 +99,9 @@ namespace CNORXZ
return For<L,Xpr>(size, id, xpr, NoF {});
}
/************
* SFor *
************/
/*==========+
| SFor |
+==========*/
template <SizeT N, SizeT L, class Xpr, class F>
constexpr SFor<N,L,Xpr,F>::SFor(const IndexId<L>& id, const Xpr& xpr, F&& f) :
@ -193,9 +203,9 @@ namespace CNORXZ
return;
}
/*************************
* SFor (non-member) *
*************************/
/*=======================+
| SFor (non-member) |
+=======================*/
template <SizeT N, SizeT L, class Xpr, class F>
constexpr decltype(auto) mkSFor(const IndexId<L>& id, const Xpr& xpr, F&& f)
@ -209,9 +219,9 @@ namespace CNORXZ
return SFor<N,L,Xpr>(id, xpr, NoF {});
}
/************
* PFor *
************/
/*==========+
| PFor |
+==========*/
template <SizeT L1, SizeT L2, class Xpr, class F>
constexpr PFor<L1,L2,Xpr,F>::PFor(SizeT size, const IndexId<L1>& id1, const IndexId<L2>& id2,
@ -281,9 +291,9 @@ namespace CNORXZ
return mXpr.rootSteps(id);
}
/*************************
* PFor (non-member) *
*************************/
/*=======================+
| PFor (non-member) |
+=======================*/
template <SizeT L1, SizeT L2, class Xpr, class F>
constexpr decltype(auto) mkPFor(SizeT size, const IndexId<L1>& id1, const IndexId<L2>& id2,
@ -299,9 +309,9 @@ namespace CNORXZ
return PFor<L1,L2,Xpr>(size, id1, id2, xpr, NoF {});
}
/************
* TFor *
************/
/*==========+
| TFor |
+==========*/
template <SizeT L, class Xpr, class F>
constexpr TFor<L,Xpr,F>::TFor(SizeT size, const IndexId<L>& id, const Xpr& xpr, F&& f) :
@ -389,9 +399,9 @@ namespace CNORXZ
}
/************
* EFor *
************/
/*==========+
| EFor |
+==========*/
template <SizeT N, SizeT L, class Xpr, class F>
constexpr EFor<N,L,Xpr,F>::EFor(const IndexId<L>& id, const Xpr& xpr, F&& f) :

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/for.h
@brief For expressions declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_for_h__
#define __cxz_for_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/func.cc.h
@brief Special function objects implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_func_cc_h__
#define __cxz_func_cc_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/func.h
@brief Special function objects declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_func_h__
#define __cxz_func_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/index_id.cc.h
@brief Index ID type template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_index_id_cc_h__
#define __cxz_index_id_cc_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/index_id.h
@brief Index ID type declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_index_id_h__
#define __cxz_index_id_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/pos_type.cc.h
@brief Position types template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_pos_type_cc_h__
#define __cxz_pos_type_cc_h__
@ -8,9 +18,9 @@
namespace CNORXZ
{
/************
* SPos *
************/
/*==========+
| SPos |
+==========*/
template <SizeT N>
constexpr SizeT SPos<N>::size() const
@ -106,9 +116,9 @@ namespace CNORXZ
return val();
}
/************
* UPos *
************/
/*==========+
| UPos |
+==========*/
constexpr UPos::UPos(SizeT ext) : mExt(ext) {}
@ -173,9 +183,9 @@ namespace CNORXZ
return val();
}
/************
* FPos *
************/
/*==========+
| FPos |
+==========*/
inline FPos::FPos(SizeT ext, const SizeT* map) : mExt(ext), mMap(map) {}
@ -224,9 +234,9 @@ namespace CNORXZ
return val();
}
/*************
* SFPos *
*************/
/*===========+
| SFPos |
+===========*/
template <SizeT N, SizeT... Ms>
Arr<SizeT,sizeof...(Ms)> SFPos<N,Ms...>::sMs = { Ms... };
@ -310,9 +320,9 @@ namespace CNORXZ
return val();
}
/************
* MPos *
************/
/*==========+
| MPos |
+==========*/
template <class BPosT, class NPosT>
constexpr MPos<BPosT,NPosT>::MPos()
@ -401,9 +411,9 @@ namespace CNORXZ
return extend(a);
}
/************
* DPos *
************/
/*==========+
| DPos |
+==========*/
inline DPos::DPos(Uptr<VPosBase>&& a) :
ObjHandle<VPosBase>(std::forward<Uptr<VPosBase>>(a))
@ -506,9 +516,9 @@ namespace CNORXZ
return val();
}
/***************
* DPosRef *
***************/
/*=============+
| DPosRef |
+=============*/
inline DPosRef::DPosRef(const VPosBase* p) : mP(p) {}
@ -587,9 +597,9 @@ namespace CNORXZ
return val();
}
/************
* EPos *
************/
/*==========+
| EPos |
+==========*/
template <class BPosT, class... OPosTs>
constexpr EPos<BPosT,OPosTs...>::EPos(const BPosT& b, const OPosTs&... os) :
@ -679,9 +689,9 @@ namespace CNORXZ
return OEPosT(BPosT::next(), std::get<Is>(mP).next()...);
}
/*********************************
* Traits and Helper-Classes *
*********************************/
/*===============================+
| Traits and Helper-Classes |
+===============================*/
template <class BPosT, class OPosT, SizeT N>
decltype(auto) MkEPos<BPosT,OPosT,N>::mk(const BPosT& a, const OPosT& b)

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/pos_type.h
@brief Position types declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_pos_type_h__
#define __cxz_pos_type_h__
@ -296,9 +306,9 @@ namespace CNORXZ
constexpr decltype(auto) get() const;
};
/*********************************
* Traits and Helper-Classes *
*********************************/
/*===============================+
| Traits and Helper-Classes |
+===============================*/
template <class T>
struct is_pos_type { CXZ_CVAL_FALSE; };
@ -370,9 +380,9 @@ namespace CNORXZ
template <class BPosT, class OPosT, SizeT... Is>
decltype(auto) mkiEPos(const BPosT& a, const OPosT& b, std::index_sequence<Is...> is);
/**************************************************
* Traits and Helper-Classes: Specializations *
**************************************************/
/*================================================+
| Traits and Helper-Classes: Specializations |
+================================================*/
template <SizeT N> struct is_pos_type<SPos<N>> { CXZ_CVAL_TRUE; };
template <SizeT N> struct is_scalar_pos_type<SPos<N>> { CXZ_CVAL_TRUE; };

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/vpos_type.cc.h
@brief Dynamic position types template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_vpos_type_cc_h__
#define __cxz_vpos_type_cc_h__
@ -7,9 +17,9 @@
namespace CNORXZ
{
/************
* VPos *
************/
/*==========+
| VPos |
+==========*/
template <class PosT>
VPos<PosT>::VPos(const PosT& a) :
@ -67,9 +77,9 @@ namespace CNORXZ
return std::make_unique<VPos<OPosT>>( (*this)(UPos(a->vval())) );
}
/******************
* VPos<MPos> *
******************/
/*================+
| VPos<MPos> |
+================*/
template <class PosT1, class PosT2>
VPos<MPos<PosT1,PosT2>>::VPos(const VPos& a) :
@ -158,9 +168,9 @@ namespace CNORXZ
return std::make_unique<VPos<OPosT>>( (*this)(UPos(a->vval())) );
}
/***************
* VPosRef *
***************/
/*=============+
| VPosRef |
+=============*/
template <class PosT>
VPosRef<PosT>::VPosRef(const PosT* c) :
@ -218,9 +228,9 @@ namespace CNORXZ
return std::make_unique<VPos<OPosT>>( (*mC)(UPos(a->vval())) );
}
/*********************
* VPosRef<MPos> *
*********************/
/*===================+
| VPosRef<MPos> |
+===================*/
template <class PosT1, class PosT2>
VPosRef<MPos<PosT1,PosT2>>::VPosRef(const MPos<PosT1,PosT2>* c) :
@ -288,9 +298,9 @@ namespace CNORXZ
return std::make_unique<VPos<OPosT>>( (*mC)(UPos(a->vval())) );
}
/*******************
* PosFromVPos *
*******************/
/*=================+
| PosFromVPos |
+=================*/
template <class PosT>
inline decltype(auto) PosFromVPos<PosT>::make(const VPosBase* a)

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/vpos_type.h
@brief Dynamic position types declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_vpos_type_h__
#define __cxz_vpos_type_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/xpr.cc.h
@brief Xpression template implementations main header.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "vpos_type.cc.h"
#include "pos_type.cc.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/xpr.h
@brief Xpression main header.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "vpos_type.h"
#include "pos_type.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/xpr_base.cc.h
@brief Xpression base template implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_xpr_base_cc_h__
#define __cxz_xpr_base_cc_h__
@ -7,9 +17,9 @@
namespace CNORXZ
{
/************
* VXpr *
************/
/*==========+
| VXpr |
+==========*/
template <typename T, class Xpr>
VXpr<T,Xpr>::VXpr(const XprInterface<Xpr>& a) :
@ -40,9 +50,9 @@ namespace CNORXZ
return DPos(this->rootSteps(id));
}
/************
* DXpr *
************/
/*==========+
| DXpr |
+==========*/
template <typename T>
template <class Xpr>

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file include/xpr/xpr_base.h
@brief Xpression base declarations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_xpr_base_h__
#define __cxz_xpr_base_h__

View file

@ -1,3 +1,15 @@
// -*- C++ -*-
/**
@file lib/base/config.cc
@brief Runtime config functions implementations.
Declare functions returning version and configuration infos.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "base/config.h"

View file

@ -1,3 +1,15 @@
// -*- C++ -*-
/**
@file lib/base/to_string.cc
@brief String converter implementations.
Declaration of functions that convert a given object/type to a string.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "base/base.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file lib/base/uuid.cc
@brief cnorxz uuid implementation.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include <random>
#include <ctime>

View file

@ -2,10 +2,9 @@
/**
@file lib/memory/memcount.cc
@brief ...
@brief Implementation of MemCount member functions.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file lib/ranges/crange.cc
@brief CRange and CIndex member function implementation.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "ranges/ranges.h"
#include "ranges/prange.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file lib/ranges/dindex.cc
@brief DIndex implementation.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "ranges/ranges.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file lib/ranges/index_format.cc
@brief Index formats implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "ranges/index_format.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file lib/ranges/index_pack.cc
@brief Index pack implementations.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "ranges/ranges.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file lib/ranges/range_base.cc
@brief RangeBase implementation.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "ranges/ranges.h"
#include "array/array.h"
@ -5,9 +15,9 @@
namespace CNORXZ
{
/*************************
* RangeFactoryBase *
*************************/
/*=======================+
| RangeFactoryBase |
+=======================*/
Map<SizeT,Map<Vector<Uuid>,RangePtr>> RangeFactoryBase::sCreated;
@ -46,9 +56,9 @@ namespace CNORXZ
return rx;
}
/******************
* RangeBase *
******************/
/*================+
| RangeBase |
+================*/
RangeBase::RangeBase()
{
@ -91,9 +101,9 @@ namespace CNORXZ
return this->index(this->size());
}
/****************************
* Non-member functions *
****************************/
/*==========================+
| Non-member functions |
+==========================*/
RangePack::operator RangePtr() const
{

View file

@ -1,12 +1,22 @@
// -*- C++ -*-
/**
@file lib/ranges/yrange.cc
@brief YRange and YIndex implementations.
Copyright (c) 2022 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "ranges/ranges.h"
#include "array/array.h"
namespace CNORXZ
{
/*************************
* YIndex (private) *
*************************/
/*=======================+
| YIndex (private) |
+=======================*/
inline DPack YIndex::mkIndices() const
{
@ -120,9 +130,9 @@ namespace CNORXZ
}
/***************
* YIndex *
***************/
/*=============+
| YIndex |
+=============*/
YIndex::YIndex(const YIndex& i) :
IndexInterface<YIndex,Vector<DType>>(i),
@ -507,9 +517,9 @@ namespace CNORXZ
}
/****************************
* non-member functions *
****************************/
/*==========================+
| non-member functions |
+==========================*/
YIndex yindex(const DPack& pack)
{
@ -531,9 +541,9 @@ namespace CNORXZ
return std::make_shared<YIndex>(is);
}
/**********************
* YRangeFactory *
**********************/
/*====================+
| YRangeFactory |
+====================*/
YRangeFactory::YRangeFactory(const Vector<RangePtr>& rvec) :
mRVec(rvec) {}
@ -560,9 +570,9 @@ namespace CNORXZ
}
}
/***************
* YRange *
***************/
/*=============+
| YRange |
+=============*/
RangePtr YRange::sub(SizeT i) const
{
@ -649,18 +659,18 @@ namespace CNORXZ
YRange::YRange(Vector<RangePtr>&& rvec) : mRVec(std::forward<Vector<RangePtr>>(rvec)) {}
/****************************
* non-member functions *
****************************/
/*==========================+
| non-member functions |
+==========================*/
RangePtr yrange(const Vector<RangePtr>& rs)
{
return YRangeFactory(rs).create();
}
/*******************
* Range Casts *
*******************/
/*=================+
| Range Casts |
+=================*/
Sptr<YRange> RangeCast<YRange>::func(const RangePtr& r)
{

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/cer_array.cc.h
@brief Load and save implementation for MArray.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cereal_array_cc_h__
#define __cxz_cereal_array_cc_h__
@ -23,7 +33,6 @@ namespace CNORXZ
{
CXZ_ASSERT(version == 1u, "format version = " << version << " not supported");
cer::save_load(ar, "range", AB::mRange);
//ar(cereal::make_nvp("range", AB::mRange));
ar(cereal::make_nvp("data", mCont));
}
}

View file

@ -1,19 +1,35 @@
// -*- C++ -*-
/**
@file opt/cereal/include/cer_base.h
@brief CNORXZ Cereal basic types declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cer_base_h__
#define __cxz_cer_base_h__
#define CXZ_CEREAL_FORMAT_VERION 1u
#define CXZ_CEREAL_FORMAT_VERION 1u /**< CNORXZ specific cereal format version. */
namespace CNORXZ
{
namespace cer
{
/** ****
Archive format enum class.
*/
enum class Format {
BINARY = 1u,
JSON = 2u,
XML = 3u
};
/** ****
Content type enum class.
*/
enum class ContentType {
ARRAY = 1u,
MAP = 2u

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/cer_header.cc.h
@brief Load and save implementation for CNORXZ cereal data header.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cereal_header_cc_h__
#define __cxz_cereal_header_cc_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/cer_header.h
@brief CNORXZ Cereal data header declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cereal_header_h__
#define __cxz_cereal_header_h__
@ -9,13 +19,19 @@ namespace CNORXZ
{
namespace cer
{
/** ****
Cereal data header struct.
*/
struct Header
{
String version;
String commit;
ContentType content;
String version; /**< CNORXZ version. */
String commit; /**< CNORXZ git commit. */
ContentType content; /**< Content type. */
};
/** Create header.
@param content Content type.
*/
inline Header mkHeader(const ContentType content)
{
Header o;
@ -24,10 +40,20 @@ namespace CNORXZ
o.content = content;
return o;
}
/** Serialze header, store in archive.
@param ar Target archive.
@param h Input header.
@param version Version.
*/
template <class Archive>
void save(Archive& ar, const Header& h, const std::uint32_t version);
/** Deserialze header from archive.
@param ar Source archive.
@param h Target header reference.
@param version Version.
*/
template <class Archive>
void load(Archive& ar, Header& h, const std::uint32_t version);

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/cer_ranges.cc.h
@brief Load and save implementation for cnorxz ranges.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cereal_ranges_cc_h__
#define __cxz_cereal_ranges_cc_h__
@ -12,9 +22,9 @@
namespace CNORXZ
{
/**************
* save *
**************/
/*============+
| save |
+============*/
template <class Archive>
void save(Archive& ar, const Uuid& id)
@ -51,9 +61,9 @@ namespace CNORXZ
ar(cereal::make_nvp("sub", mRVec));
}
/**************
* load *
**************/
/*============+
| load |
+============*/
template <class Archive>
void load(Archive& ar, Uuid& id)

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/cer_type_register.cc.h
@brief Register CNORXZ cereal types.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cereal_type_register_cc_h__
#define __cxz_cereal_type_register_cc_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/cnorxz_cereal.h
@brief CNORXZ Cereal main header
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include "cer_base.h"
#include "cer_header.h"

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/range_save_load.cc.h
@brief CNORXZ Cereal range save load implementation.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __range_save_load_cc_h__
#define __range_save_load_cc_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/range_save_load.h
@brief CNORXZ Cereal range save load declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __range_save_load_h__
#define __range_save_load_h__
@ -8,8 +18,14 @@ namespace CNORXZ
{
namespace cer
{
// use this function to register the range in the map of the range factories
// (otherwise there might be more than one instance of the same range)
/** Deserialize and register range from cereal archive.
Always use this function to load ranges from archives so that it is
registered in the map of the range factories. Otherwise there might be more
than one instance of the same range.
@param ar Archive to read from.
@param name Archive key.
@param r Target range pointer.
*/
template <class Archive>
RangePtr save_load(Archive& ar, const String& name, RangePtr& r);
}

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/utilities.cc.h
@brief CNORXZ Cereal utilities implementation.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cereal_utilities_cc_h__
#define __cxz_cereal_utilities_cc_h__

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/include/utilities.h
@brief CNORXZ Cereal utilities declaration.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#ifndef __cxz_cereal_utilities_h__
#define __cxz_cereal_utilities_h__
@ -14,68 +24,141 @@ namespace CNORXZ
{
namespace cer
{
/** ****
Output archive type trait.
@tparam F Format enum.
*/
template <Format F>
struct OutputFormatMap
{};
/** Output archive for binary format. */
template <>
struct OutputFormatMap<Format::BINARY>
{ typedef cereal::BinaryOutputArchive type; };
{ typedef cereal::BinaryOutputArchive type; /**< archive type. */ };
/** Output archive for json format. */
template <>
struct OutputFormatMap<Format::JSON>
{ typedef cereal::JSONOutputArchive type; };
{ typedef cereal::JSONOutputArchive type; /**< archive type. */ };
/** Output archive for xml format. */
template <>
struct OutputFormatMap<Format::XML>
{ typedef cereal::XMLOutputArchive type; };
{ typedef cereal::XMLOutputArchive type; /**< archive type. */ };
/** ****
Input archive type trait.
@tparam F Format enum.
*/
template <Format F>
struct InputFormatMap
{};
/** Input archive for binary format. */
template <>
struct InputFormatMap<Format::BINARY>
{ typedef cereal::BinaryInputArchive type; };
{ typedef cereal::BinaryInputArchive type; /**< archive type. */ };
/** Input archive for json format. */
template <>
struct InputFormatMap<Format::JSON>
{ typedef cereal::JSONInputArchive type; };
{ typedef cereal::JSONInputArchive type; /**< archive type. */ };
/** Input archive for xml format. */
template <>
struct InputFormatMap<Format::XML>
{ typedef cereal::XMLInputArchive type; };
{ typedef cereal::XMLInputArchive type; /**< archive type. */ };
/** Serialize MArray to stream
@tparam F Format enum class [BINARY,JSON,XML].
@tparam T Array element value type.
@param os Output stream.
@param data Array to be serialized.
*/
template <Format F, typename T>
void write(std::ostream& os, const MArray<T>& data);
/** Deserialize MArray from stream
@tparam F Format enum class [BINARY,JSON,XML].
@tparam T Array element value type.
@param is Input stream.
@param data Target array.
*/
template <Format F, typename T>
void read(std::istream& is, MArray<T>& data);
/** Serialize MArray and write to file.
@tparam F Format enum class [BINARY,JSON,XML].
@tparam T Array element value type.
@param name File name.
@param data Array to be saved.
*/
template <Format F, typename T>
void writeFile(const String& name, const MArray<T>& data);
/** Read and deserialize MArray from cereal compatibel file.
@tparam F Format enum class [BINARY,JSON,XML].
@tparam T Array element value type.
@param name File name.
@param data target array.
*/
template <Format F, typename T>
void readFile(const String& name, MArray<T>& data);
/** Serialize MArray and write to binary file.
@tparam T Array element value type.
@param name File name.
@param data Array to be saved.
*/
template <typename T>
void writeBINARYFile(const String& name, const MArray<T>& data) { writeFile<Format::BINARY>(name, data); }
inline void writeBINARYFile(const String& name, const MArray<T>& data)
{ writeFile<Format::BINARY>(name, data); }
/** Read and deserialize MArray from cereal compatibel binary file.
@tparam T Array element value type.
@param name File name.
@param data target array.
*/
template <typename T>
void readBINARYFile(const String& name, MArray<T>& data) { readFile<Format::BINARY>(name, data); }
inline void readBINARYFile(const String& name, MArray<T>& data)
{ readFile<Format::BINARY>(name, data); }
/** Serialize MArray and write to json file.
@tparam T Array element value type.
@param name File name.
@param data Array to be saved.
*/
template <typename T>
void writeJSONFile(const String& name, const MArray<T>& data) { writeFile<Format::JSON>(name, data); }
inline void writeJSONFile(const String& name, const MArray<T>& data)
{ writeFile<Format::JSON>(name, data); }
/** Read and deserialize MArray from cereal compatibel json file.
@tparam T Array element value type.
@param name File name.
@param data target array.
*/
template <typename T>
void readJSONFile(const String& name, MArray<T>& data) { readFile<Format::JSON>(name, data); }
inline void readJSONFile(const String& name, MArray<T>& data)
{ readFile<Format::JSON>(name, data); }
/** Serialize MArray and write to xml file.
@tparam T Array element value type.
@param name File name.
@param data Array to be saved.
*/
template <typename T>
void writeXMLFile(const String& name, const MArray<T>& data) { writeFile<Format::XML>(name, data); }
inline void writeXMLFile(const String& name, const MArray<T>& data)
{ writeFile<Format::XML>(name, data); }
/** Read and deserialize MArray from cereal compatibel xml file.
@tparam T Array element value type.
@param name File name.
@param data target array.
*/
template <typename T>
void readXMLFile(const String& name, MArray<T>& data) { readFile<Format::XML>(name, data); }
inline void readXMLFile(const String& name, MArray<T>& data)
{ readFile<Format::XML>(name, data); }
}
}

View file

@ -1,3 +1,13 @@
// -*- C++ -*-
/**
@file opt/cereal/tests/cereal_unit_test.cc
@brief cnorxz cereal unit tests.
Copyright (c) 2024 Christian Zimmermann. All rights reserved.
Mail: chizeta@f3l.de
**/
#include <cstdlib>
#include <iostream>

View file

@ -34,7 +34,7 @@ namespace CNORXZ
H5Sclose(memspace);
}
else {
CXZ_ERROR("IMPLEMENT!!!");
CXZ_ERROR("Got array type with non-trivial format; non-contiguous data formats are not supported yet!");
}
return *this;
}

Some files were not shown because too many files have changed in this diff Show more