Skip to content

Commit f387154

Browse files
Update to Bandicoot release 2.0.0 (#2)
1 parent 023884d commit f387154

File tree

310 files changed

+17632
-1881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+17632
-1881
lines changed

inst/include/bandicoot

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,21 +194,27 @@ namespace coot
194194
#include "bandicoot_bits/dev_mem_t_operators.hpp"
195195
#include "bandicoot_bits/memory_overlaps.hpp"
196196
#include "bandicoot_bits/is_alias.hpp"
197+
#include "bandicoot_bits/alias_wrapper.hpp"
197198

198199
//
199200
// class prototypes
200201

201202
#include "bandicoot_bits/cond_rel_bones.hpp"
202203

203204
#include "bandicoot_bits/Base_bones.hpp"
205+
#include "bandicoot_bits/BaseCube_bones.hpp"
204206

205207
#include "bandicoot_bits/MatValProxy_bones.hpp"
206208
#include "bandicoot_bits/Mat_bones.hpp"
207209
#include "bandicoot_bits/Row_bones.hpp"
208210
#include "bandicoot_bits/Col_bones.hpp"
209211
#include "bandicoot_bits/SizeMat_bones.hpp"
212+
#include "bandicoot_bits/SizeCube_bones.hpp"
210213
#include "bandicoot_bits/subview_bones.hpp"
211214
#include "bandicoot_bits/diagview_bones.hpp"
215+
#include "bandicoot_bits/subview_each_bones.hpp"
216+
#include "bandicoot_bits/Cube_bones.hpp"
217+
#include "bandicoot_bits/subview_cube_bones.hpp"
212218

213219
#include "bandicoot_bits/eOp_bones.hpp"
214220
#include "bandicoot_bits/eGlue_bones.hpp"
@@ -218,6 +224,11 @@ namespace coot
218224
#include "bandicoot_bits/Op_bones.hpp"
219225
#include "bandicoot_bits/Glue_bones.hpp"
220226
#include "bandicoot_bits/mtGlue_bones.hpp"
227+
#include "bandicoot_bits/eOpCube_bones.hpp"
228+
#include "bandicoot_bits/mtOpCube_bones.hpp"
229+
#include "bandicoot_bits/eGlueCube_bones.hpp"
230+
#include "bandicoot_bits/mtGlueCube_bones.hpp"
231+
#include "bandicoot_bits/CubeToMatOp_bones.hpp"
221232
#include "bandicoot_bits/coot_rng_bones.hpp"
222233

223234
#include "bandicoot_bits/op_sum_bones.hpp"
@@ -246,6 +257,8 @@ namespace coot
246257
#include "bandicoot_bits/op_det_bones.hpp"
247258
#include "bandicoot_bits/op_pinv_bones.hpp"
248259
#include "bandicoot_bits/op_shuffle_bones.hpp"
260+
#include "bandicoot_bits/op_row_as_mat_bones.hpp"
261+
#include "bandicoot_bits/op_col_as_mat_bones.hpp"
249262

250263
#include "bandicoot_bits/mtop_conv_to_bones.hpp"
251264
#include "bandicoot_bits/mtop_all_bones.hpp"
@@ -395,9 +408,10 @@ namespace coot
395408
#include "bandicoot_bits/opencl/min.hpp"
396409
#include "bandicoot_bits/opencl/max.hpp"
397410
#include "bandicoot_bits/opencl/max_abs.hpp"
398-
#include "bandicoot_bits/opencl/repmat.hpp"
411+
#include "bandicoot_bits/opencl/broadcast.hpp"
399412
#include "bandicoot_bits/opencl/linspace.hpp"
400413
#include "bandicoot_bits/opencl/logspace.hpp"
414+
#include "bandicoot_bits/opencl/regspace.hpp"
401415
#include "bandicoot_bits/opencl/trans.hpp"
402416
#include "bandicoot_bits/opencl/clamp.hpp"
403417
#include "bandicoot_bits/opencl/norm.hpp"
@@ -457,9 +471,10 @@ namespace coot
457471
#include "bandicoot_bits/cuda/min.hpp"
458472
#include "bandicoot_bits/cuda/max.hpp"
459473
#include "bandicoot_bits/cuda/max_abs.hpp"
460-
#include "bandicoot_bits/cuda/repmat.hpp"
474+
#include "bandicoot_bits/cuda/broadcast.hpp"
461475
#include "bandicoot_bits/cuda/linspace.hpp"
462476
#include "bandicoot_bits/cuda/logspace.hpp"
477+
#include "bandicoot_bits/cuda/regspace.hpp"
463478
#include "bandicoot_bits/cuda/trans.hpp"
464479
#include "bandicoot_bits/cuda/clamp.hpp"
465480
#include "bandicoot_bits/cuda/norm.hpp"
@@ -500,9 +515,11 @@ namespace coot
500515
// classes that underlay metaprogramming
501516

502517
#include "bandicoot_bits/unwrap.hpp"
518+
#include "bandicoot_bits/unwrap_cube.hpp"
503519
#include "bandicoot_bits/no_conv_unwrap.hpp"
504520
#include "bandicoot_bits/special_cor_cov_unwrap.hpp"
505521
#include "bandicoot_bits/SizeProxy.hpp"
522+
#include "bandicoot_bits/SizeProxyCube.hpp"
506523
#include "bandicoot_bits/strip.hpp"
507524
#include "bandicoot_bits/extract_subview.hpp"
508525
#include "bandicoot_bits/copy_alias.hpp"
@@ -529,6 +546,12 @@ namespace coot
529546
#include "bandicoot_bits/operator_relational.hpp"
530547
#include "bandicoot_bits/operator_ostream.hpp"
531548

549+
#include "bandicoot_bits/operator_cube_times.hpp"
550+
#include "bandicoot_bits/operator_cube_plus.hpp"
551+
#include "bandicoot_bits/operator_cube_minus.hpp"
552+
#include "bandicoot_bits/operator_cube_schur.hpp"
553+
#include "bandicoot_bits/operator_cube_div.hpp"
554+
532555

533556

534557
//
@@ -560,6 +583,7 @@ namespace coot
560583
#include "bandicoot_bits/fn_reshape.hpp"
561584
#include "bandicoot_bits/fn_linspace.hpp"
562585
#include "bandicoot_bits/fn_logspace.hpp"
586+
#include "bandicoot_bits/fn_regspace.hpp"
563587
#include "bandicoot_bits/fn_vectorise.hpp"
564588
#include "bandicoot_bits/fn_clamp.hpp"
565589
#include "bandicoot_bits/fn_size.hpp"
@@ -604,14 +628,19 @@ namespace coot
604628
#include "bandicoot_bits/cond_rel_meat.hpp"
605629

606630
#include "bandicoot_bits/Base_meat.hpp"
631+
#include "bandicoot_bits/BaseCube_meat.hpp"
607632

608633
#include "bandicoot_bits/MatValProxy_meat.hpp"
609634
#include "bandicoot_bits/Mat_meat.hpp"
610635
#include "bandicoot_bits/Row_meat.hpp"
611636
#include "bandicoot_bits/Col_meat.hpp"
612637
#include "bandicoot_bits/SizeMat_meat.hpp"
638+
#include "bandicoot_bits/SizeCube_meat.hpp"
613639
#include "bandicoot_bits/subview_meat.hpp"
614640
#include "bandicoot_bits/diagview_meat.hpp"
641+
#include "bandicoot_bits/subview_each_meat.hpp"
642+
#include "bandicoot_bits/Cube_meat.hpp"
643+
#include "bandicoot_bits/subview_cube_meat.hpp"
615644

616645
#include "bandicoot_bits/eOp_meat.hpp"
617646
#include "bandicoot_bits/eGlue_meat.hpp"
@@ -621,6 +650,11 @@ namespace coot
621650
#include "bandicoot_bits/Op_meat.hpp"
622651
#include "bandicoot_bits/Glue_meat.hpp"
623652
#include "bandicoot_bits/mtGlue_meat.hpp"
653+
#include "bandicoot_bits/eOpCube_meat.hpp"
654+
#include "bandicoot_bits/mtOpCube_meat.hpp"
655+
#include "bandicoot_bits/eGlueCube_meat.hpp"
656+
#include "bandicoot_bits/mtGlueCube_meat.hpp"
657+
#include "bandicoot_bits/CubeToMatOp_meat.hpp"
624658
#include "bandicoot_bits/coot_rng_meat.hpp"
625659

626660
#include "bandicoot_bits/op_sum_meat.hpp"
@@ -649,6 +683,8 @@ namespace coot
649683
#include "bandicoot_bits/op_det_meat.hpp"
650684
#include "bandicoot_bits/op_pinv_meat.hpp"
651685
#include "bandicoot_bits/op_shuffle_meat.hpp"
686+
#include "bandicoot_bits/op_row_as_mat_meat.hpp"
687+
#include "bandicoot_bits/op_col_as_mat_meat.hpp"
652688

653689
#include "bandicoot_bits/mtop_conv_to_meat.hpp"
654690
#include "bandicoot_bits/mtop_all_meat.hpp"
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
//
3+
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4+
// Copyright 2008-2016 National ICT Australia (NICTA)
5+
// Copyright 2023 Marcus Edel (http://www.kurg.org)
6+
// Copyright 2025 Ryan Curtin (http://www.ratml.org)
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
// ------------------------------------------------------------------------
19+
20+
21+
22+
template<typename elem_type, typename derived>
23+
struct BaseCube_eval_Cube
24+
{
25+
coot_warn_unused coot_inline const derived& eval() const;
26+
};
27+
28+
29+
template<typename elem_type, typename derived>
30+
struct BaseCube_eval_expr
31+
{
32+
coot_warn_unused inline Cube<elem_type> eval() const; //!< force the immediate evaluation of a delayed expression
33+
};
34+
35+
36+
template<typename elem_type, typename derived, bool condition>
37+
struct BaseCube_eval {};
38+
39+
template<typename elem_type, typename derived>
40+
struct BaseCube_eval<elem_type, derived, true> { typedef BaseCube_eval_Cube<elem_type, derived> result; };
41+
42+
template<typename elem_type, typename derived>
43+
struct BaseCube_eval<elem_type, derived, false> { typedef BaseCube_eval_expr<elem_type, derived> result; };
44+
45+
46+
47+
//! Analog of the Base class, intended for cubes
48+
template<typename elem_type, typename derived>
49+
struct BaseCube
50+
: public BaseCube_eval<elem_type, derived, is_Cube<derived>::value>::result
51+
{
52+
coot_inline const derived& get_ref() const;
53+
54+
coot_cold inline void print( const std::string extra_text = "") const;
55+
coot_cold inline void print(std::ostream& user_stream, const std::string extra_text = "") const;
56+
57+
coot_cold inline void raw_print( const std::string extra_text = "") const;
58+
coot_cold inline void raw_print(std::ostream& user_stream, const std::string extra_text = "") const;
59+
60+
//coot_cold inline void brief_print( const std::string extra_text = "") const;
61+
//coot_cold inline void brief_print(std::ostream& user_stream, const std::string extra_text = "") const;
62+
63+
coot_warn_unused inline elem_type min() const;
64+
coot_warn_unused inline elem_type max() const;
65+
66+
coot_warn_unused inline uword index_min() const;
67+
coot_warn_unused inline uword index_max() const;
68+
69+
coot_warn_unused inline const CubeToMatOp<derived, op_row_as_mat> row_as_mat(const uword in_row) const;
70+
coot_warn_unused inline const CubeToMatOp<derived, op_col_as_mat> col_as_mat(const uword in_col) const;
71+
};

0 commit comments

Comments
 (0)