diff --git a/Makefile b/Makefile index 2bc0cd21..e832455d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/YASK-LICENSE.md b/YASK-LICENSE.md index cfb35c85..a5b45e80 100644 --- a/YASK-LICENSE.md +++ b/YASK-LICENSE.md @@ -1,5 +1,5 @@ YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/docs/api/html/yask__common__api_8hpp_source.html b/docs/api/html/yask__common__api_8hpp_source.html index 4ce41780..b90aa4b5 100644 --- a/docs/api/html/yask__common__api_8hpp_source.html +++ b/docs/api/html/yask__common__api_8hpp_source.html @@ -70,7 +70,7 @@
yask_common_api.hpp
-Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2020, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include <string>
35 #include <vector>
36 #include <map>
37 #include <iostream>
38 #include <ostream>
39 #include <memory>
40 #include <functional>
41 
42 namespace yask {
43 
50 
54  std::string yask_get_version_string();
55 
57 
58 #ifdef SWIG
59  typedef long int idx_t; // SWIG doesn't seem to understand int64_t.
60 #else
61  typedef std::int64_t idx_t;
62 #endif
63 
64  // Forward declarations of class-pointers.
65 
66  class yask_output;
68  typedef std::shared_ptr<yask_output> yask_output_ptr;
69 
72  typedef std::shared_ptr<yask_file_output> yask_file_output_ptr;
73 
76  typedef std::shared_ptr<yask_string_output> yask_string_output_ptr;
77 
80  typedef std::shared_ptr<yask_stdout_output> yask_stdout_output_ptr;
81 
84  typedef std::shared_ptr<yask_null_output> yask_null_output_ptr;
85 
87 
88  class yask_exception: public std::exception {
89  private:
91  std::string _msg;
92 
93  public:
94 
97  _msg("YASK exception") { };
98 
100  yask_exception(const std::string& message) :
101  _msg(message) { };
102 
103  virtual ~yask_exception() { };
104 
106 
108  virtual const char* what() const noexcept;
109 
111  virtual void add_message(const std::string& message );
113 
115 
117  virtual const char* get_message() const;
118  };
119 
122  public:
123  virtual ~yask_output_factory() {}
124 
126 
131  virtual yask_file_output_ptr
132  new_file_output(const std::string& file_name ) const;
135 
137 
141  virtual yask_string_output_ptr
142  new_string_output() const;
143 
145 
149  virtual yask_stdout_output_ptr
150  new_stdout_output() const;
151 
153 
157  virtual yask_null_output_ptr
158  new_null_output() const;
159  };
160 
162  class yask_output {
163  public:
164  virtual ~yask_output() {}
165 
167 
168  virtual std::ostream& get_ostream() =0;
169  };
170 
172  class yask_file_output : public virtual yask_output {
173  public:
174  virtual ~yask_file_output() {}
175 
177 
178  virtual std::string get_filename() const =0;
179 
181  virtual void close() =0;
182  };
183 
185  class yask_string_output : public virtual yask_output {
186  public:
187  virtual ~yask_string_output() {}
188 
190 
192  virtual std::string get_string() const =0;
193 
195  virtual void discard() =0;
196  };
197 
199  class yask_stdout_output : public virtual yask_output {
200  public:
201  virtual ~yask_stdout_output() {}
202  };
203 
205 
206  class yask_null_output : public virtual yask_output {
207  public:
208  virtual ~yask_null_output() {}
209  };
210 
212 
218  std::vector<double>
219  get_center_fd_coefficients(int derivative_order,
221  int radius );
223 
225 
230  std::vector<double>
231  get_forward_fd_coefficients(int derivative_order,
233  int accuracy_order );
235 
237 
242  std::vector<double>
243  get_backward_fd_coefficients(int derivative_order,
245  int accuracy_order );
247 
249 
252  std::vector<double>
253  get_arbitrary_fd_coefficients(int derivative_order,
255  double eval_point,
257  const std::vector<double> sample_points );
259 
262 } // namespace yask.
263 
std::shared_ptr< yask_null_output > yask_null_output_ptr
Shared pointer to yask_null_output.
Definition: yask_common_api.hpp:82
+Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2021, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include <string>
35 #include <vector>
36 #include <map>
37 #include <iostream>
38 #include <ostream>
39 #include <memory>
40 #include <functional>
41 
42 namespace yask {
43 
50 
54  std::string yask_get_version_string();
55 
57 
58 #ifdef SWIG
59  typedef long int idx_t; // SWIG doesn't seem to understand int64_t.
60 #else
61  typedef std::int64_t idx_t;
62 #endif
63 
64  // Forward declarations of class-pointers.
65 
66  class yask_output;
68  typedef std::shared_ptr<yask_output> yask_output_ptr;
69 
72  typedef std::shared_ptr<yask_file_output> yask_file_output_ptr;
73 
76  typedef std::shared_ptr<yask_string_output> yask_string_output_ptr;
77 
80  typedef std::shared_ptr<yask_stdout_output> yask_stdout_output_ptr;
81 
84  typedef std::shared_ptr<yask_null_output> yask_null_output_ptr;
85 
87 
88  class yask_exception: public std::exception {
89  private:
91  std::string _msg;
92 
93  public:
94 
97  _msg("YASK exception") { };
98 
100  yask_exception(const std::string& message) :
101  _msg(message) { };
102 
103  virtual ~yask_exception() { };
104 
106 
108  virtual const char* what() const noexcept;
109 
111  virtual void add_message(const std::string& message );
113 
115 
117  virtual const char* get_message() const;
118  };
119 
122  public:
123  virtual ~yask_output_factory() {}
124 
126 
131  virtual yask_file_output_ptr
132  new_file_output(const std::string& file_name ) const;
135 
137 
141  virtual yask_string_output_ptr
142  new_string_output() const;
143 
145 
149  virtual yask_stdout_output_ptr
150  new_stdout_output() const;
151 
153 
157  virtual yask_null_output_ptr
158  new_null_output() const;
159  };
160 
162  class yask_output {
163  public:
164  virtual ~yask_output() {}
165 
167 
168  virtual std::ostream& get_ostream() =0;
169  };
170 
172  class yask_file_output : public virtual yask_output {
173  public:
174  virtual ~yask_file_output() {}
175 
177 
178  virtual std::string get_filename() const =0;
179 
181  virtual void close() =0;
182  };
183 
185  class yask_string_output : public virtual yask_output {
186  public:
187  virtual ~yask_string_output() {}
188 
190 
192  virtual std::string get_string() const =0;
193 
195  virtual void discard() =0;
196  };
197 
199  class yask_stdout_output : public virtual yask_output {
200  public:
201  virtual ~yask_stdout_output() {}
202  };
203 
205 
206  class yask_null_output : public virtual yask_output {
207  public:
208  virtual ~yask_null_output() {}
209  };
210 
212 
218  std::vector<double>
219  get_center_fd_coefficients(int derivative_order,
221  int radius );
223 
225 
230  std::vector<double>
231  get_forward_fd_coefficients(int derivative_order,
233  int accuracy_order );
235 
237 
242  std::vector<double>
243  get_backward_fd_coefficients(int derivative_order,
245  int accuracy_order );
247 
249 
252  std::vector<double>
253  get_arbitrary_fd_coefficients(int derivative_order,
255  double eval_point,
257  const std::vector<double> sample_points );
259 
262 } // namespace yask.
263 
std::shared_ptr< yask_null_output > yask_null_output_ptr
Shared pointer to yask_null_output.
Definition: yask_common_api.hpp:82
std::shared_ptr< yask_file_output > yask_file_output_ptr
Shared pointer to yask_file_output.
Definition: yask_common_api.hpp:70
Exception from YASK framework.
Definition: yask_common_api.hpp:88
std::vector< double > get_backward_fd_coefficients(int derivative_order, int accuracy_order)
Create finite-difference (FD) coefficients for the standard backward form.
diff --git a/docs/api/html/yask__compiler__api_8hpp_source.html b/docs/api/html/yask__compiler__api_8hpp_source.html index f5eda865..8e005bc1 100644 --- a/docs/api/html/yask__compiler__api_8hpp_source.html +++ b/docs/api/html/yask__compiler__api_8hpp_source.html @@ -70,7 +70,7 @@
yask_compiler_api.hpp
-Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2020, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_common_api.hpp"
35 #include <functional>
36 #include <vector>
37 
38 namespace yask {
39 
46  // Forward declarations of classes and their pointers.
47  // See yask_compiler_api.hpp for more.
48 
49  class yc_solution;
51  typedef std::shared_ptr<yc_solution> yc_solution_ptr;
52 
53  class yc_var;
55  typedef yc_var* yc_var_ptr;
56 
57  // Forward declarations of expression nodes and their pointers.
58 
59  class yc_expr_node;
61  typedef std::shared_ptr<yc_expr_node> yc_expr_node_ptr;
62 
63  class yc_bool_node;
65  typedef std::shared_ptr<yc_bool_node> yc_bool_node_ptr;
66 
69  typedef std::shared_ptr<yc_number_node> yc_number_node_ptr;
70 
73  typedef std::shared_ptr<yc_index_node> yc_index_node_ptr;
74 
77  typedef std::shared_ptr<yc_equation_node> yc_equation_node_ptr;
78 
81  typedef std::shared_ptr<yc_var_point_node> yc_var_point_node_ptr;
82 
84 }
85 
86 #include "aux/yc_node_api.hpp"
87 
88 namespace yask {
89 
95  class yc_factory {
97  public:
98  virtual ~yc_factory() {}
99 
101 
104  virtual std::string
106 
108 
112  virtual yc_solution_ptr
113  new_solution(const std::string& name ) const;
115  }; // yc_factory.
116 
118 
123  class yc_solution {
124  public:
125  virtual ~yc_solution() {}
126 
128  virtual void
132 
134 
138  virtual std::string
139  get_name() const =0;
140 
142 
145  virtual void
146  set_name(std::string name ) =0;
148 
150 
154  virtual std::string
155  get_description() const =0;
156 
158 
163  virtual void
164  set_description(std::string description ) =0;
166 
168 
173  virtual std::string
174  get_target() =0;
175 
177 
193  virtual void
194  set_target(
195  const std::string& format) =0;
196 
198 
202  virtual bool
203  is_target_set() =0;
204 
206 
207  virtual int
208  get_element_bytes() const =0;
209 
211  virtual void
212  set_element_bytes(int nbytes ) =0;
214 
216 
246  virtual yc_var_ptr
247  new_var(const std::string& name,
250  const std::vector<yc_index_node_ptr>& dims ) =0;
253 
254 #ifndef SWIG
255 
262  virtual yc_var_ptr
263  new_var(const std::string& name ,
266  const std::initializer_list<yc_index_node_ptr>& dims ) =0;
269 #endif
270 
272 
287  virtual yc_var_ptr
288  new_scratch_var(const std::string& name,
291  const std::vector<yc_index_node_ptr>& dims ) =0;
294 
295 #ifndef SWIG
296 
303  virtual yc_var_ptr
304  new_scratch_var(const std::string& name,
308  const std::initializer_list<yc_index_node_ptr>& dims ) =0;
311 #endif
312 
314 
317  virtual int
318  get_num_vars() const =0;
319 
321 
322  virtual std::vector<yc_var_ptr>
323  get_vars() =0;
324 
326 
327  virtual yc_var_ptr
328  get_var(const std::string& name ) =0;
329 
331 
346  virtual void
350  int len ) =0;
351 
353 
357  virtual bool
358  is_folding_set() =0;
359 
361  virtual void
362  clear_folding() =0;
363 
365 
372  virtual void
376  int mult ) =0;
377 
379 
383  virtual bool
384  is_clustering_set() =0;
385 
387  virtual void
388  clear_clustering() =0;
389 
391 
393  virtual int
394  get_num_equations() const =0;
395 
397 
399  virtual std::vector<yc_equation_node_ptr>
400  get_equations() =0;
401 
403 
407  virtual int
409  int level) =0;
410 
412 
416  virtual void
418  int level,
421  int distance) =0;
422 
424 
435  virtual void
436  output_solution(yask_output_ptr output) =0;
439 
440 #ifndef SWIG
441  typedef std::function<void(yc_solution& soln,
444 
446 
458  virtual void
460  output_hook_t hook_fn) =0;
461 #endif
462 
464 
487  virtual void
488  call_after_new_solution(const std::string& code) =0;
492 
494 
498 #define CALL_AFTER_NEW_SOLUTION(...) call_after_new_solution(#__VA_ARGS__)
499 
501 
510  virtual void
511  set_domain_dims(const std::vector<yc_index_node_ptr>& dims ) =0;
513 
514 #ifndef SWIG
515 
521  virtual void
522  set_domain_dims(const std::initializer_list<yc_index_node_ptr>& dims ) =0;
524 #endif
525 
527 
534  virtual void
535  set_step_dim(const yc_index_node_ptr dim) =0;
537 
539 
548  virtual void
549  set_dependency_checker_enabled(bool enable) =0;
551 
553 
556  virtual bool
558 
560 
629  virtual void
632  yc_equation_node_ptr to) =0;
634 
636 
639  virtual void
640  clear_dependencies() =0;
641 
643  inline void
644  format(const std::string& format_type,
645  yask_output_ptr output) {
646  set_target(format_type);
647  output_solution(output);
648  }
649 
651  inline yc_var_ptr
652  new_grid(const std::string& name,
653  const std::vector<yc_index_node_ptr>& dims) {
654  return new_var(name, dims);
655  }
656 
657 #ifndef SWIG
658  inline yc_var_ptr
660  new_grid(const std::string& name,
661  const std::initializer_list<yc_index_node_ptr>& dims) {
662  return new_var(name, dims);
663  }
664 #endif
665 
667  inline yc_var_ptr
668  new_scratch_grid(const std::string& name,
669  const std::vector<yc_index_node_ptr>& dims) {
670  return new_scratch_var(name, dims);
671  }
672 
673 #ifndef SWIG
674  inline yc_var_ptr
676  new_scratch_grid(const std::string& name,
677  const std::initializer_list<yc_index_node_ptr>& dims) {
678  return new_scratch_var(name, dims);
679  }
680 #endif
681 
683  inline int
684  get_num_grids() const {
685  return get_num_vars();
686  }
687 
689  inline std::vector<yc_var_ptr>
691  return get_vars();
692  }
693 
695  inline yc_var_ptr
696  get_grid(const std::string& name) {
697  return get_var(name);
698  }
699  }; // yc_solution.
700 
702 
711  class yc_var {
712  public:
713  virtual ~yc_var() {}
714 
716 
718  virtual const std::string& get_name() const =0;
719 
721 
723  virtual int get_num_dims() const =0;
724 
726 
731  virtual std::vector<std::string>
732  get_dim_names() const =0;
733 
735 
740  virtual yc_var_point_node_ptr
741  new_var_point(const std::vector<yc_number_node_ptr>& index_exprs ) =0;
745 
746 #ifndef SWIG
747 
757  virtual yc_var_point_node_ptr
758  new_var_point(const std::initializer_list<yc_number_node_ptr>& index_exprs) = 0;
759 #endif
760 
762 
777  virtual yc_var_point_node_ptr
778  new_relative_var_point(const std::vector<int>& dim_offsets ) =0;
780 
781 #ifndef SWIG
782 
788  virtual yc_var_point_node_ptr
789  new_relative_var_point(const std::initializer_list<int>& dim_offsets) = 0;
790 #endif
791 
793 
796  virtual bool
797  is_dynamic_step_alloc() const =0;
798 
800 
803  virtual void
804  set_dynamic_step_alloc(bool is_dynamic) =0;
806 
808 
814  virtual idx_t
815  get_step_alloc_size() const =0;
816 
818 
822  virtual void
823  set_step_alloc_size(idx_t size) =0;
825 
827  inline yc_var_point_node_ptr
828  new_grid_point(const std::vector<yc_number_node_ptr>& index_exprs) {
829  return new_var_point(index_exprs);
830  }
832  inline yc_var_point_node_ptr
833  new_grid_point(const std::initializer_list<yc_number_node_ptr>& index_exprs) {
834  return new_var_point(index_exprs);
835  }
837  inline yc_var_point_node_ptr
838  new_relative_grid_point(const std::vector<int>& dim_offsets) {
839  return new_relative_var_point(dim_offsets);
840  }
842  inline yc_var_point_node_ptr
843  new_relative_grid_point(const std::initializer_list<int>& dim_offsets) {
844  return new_relative_var_point(dim_offsets);
845  }
846 
847  }; // yc_var.
848 
850 
882  class yc_var_proxy {
883  private:
884  yc_var_ptr _var;
885 
886  public:
887 
889 
893  yc_var_proxy(const std::string& name,
896  yc_solution_ptr soln,
898  const std::vector< yc_index_node_ptr > &dims,
901  bool is_scratch = false) {
903  if (is_scratch)
904  _var = soln->new_scratch_var(name, dims);
905  else
906  _var = soln->new_var(name, dims);
907  }
908 
909 #ifndef SWIG
910 
916  yc_var_proxy(const std::string& name,
919  yc_solution_ptr soln,
921  const std::initializer_list< yc_index_node_ptr > &dims,
924  bool is_scratch = false) {
926  if (is_scratch)
927  _var = soln->new_scratch_var(name, dims);
928  else
929  _var = soln->new_var(name, dims);
930  }
931 #endif
932 
934 
937  yc_var_proxy(const std::string& name,
940  yc_solution_ptr soln) {
942  _var = soln->new_var(name, { });
943  }
944 
946 
950  yc_var_proxy(yc_var_ptr& var) : _var(var) { }
951 
953  virtual ~yc_var_proxy() { }
954 
956  virtual yc_var_ptr get_var() {
957  return _var;
958  }
959 
961  virtual yc_var_ptr get_var() const {
962  return _var;
963  }
964 
966 
972  virtual yc_var_point_node_ptr
973  operator()(const std::vector<yc_number_node_ptr>& index_exprs) {
974  return _var->new_var_point(index_exprs);
975  }
976 
977 #ifndef SWIG
978 
986  virtual yc_var_point_node_ptr
987  operator()(const std::initializer_list<yc_number_node_ptr>& index_exprs) {
988  return _var->new_var_point(index_exprs);
989  }
990 
992 
1001  const yc_number_any_arg i2 = nullptr,
1002  const yc_number_any_arg i3 = nullptr,
1003  const yc_number_any_arg i4 = nullptr,
1004  const yc_number_any_arg i5 = nullptr,
1005  const yc_number_any_arg i6 = nullptr) {
1006  std::vector<yc_number_node_ptr> args;
1007  if (i1)
1008  args.push_back(i1);
1009  if (i2)
1010  args.push_back(i2);
1011  if (i3)
1012  args.push_back(i3);
1013  if (i4)
1014  args.push_back(i4);
1015  if (i5)
1016  args.push_back(i5);
1017  if (i6)
1018  args.push_back(i6);
1019  return _var->new_var_point(args);
1020  }
1021 
1023 
1030  virtual operator yc_number_ptr_arg() {
1031  return _var->new_var_point({});
1032  }
1033 
1035 
1043  return _var->new_var_point({i1});
1044  }
1045 
1046 #endif
1047 
1048  }; // yc_var_proxy.
1051  typedef yc_var yc_grid;
1059 
1060 } // namespace yask.
1061 
1062 // More solution-based objects.
1063 #include "aux/yc_solution_api.hpp"
virtual void output_solution(yask_output_ptr output)=0
Optimize and the current equation(s) and write to given output object.
+Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2021, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_common_api.hpp"
35 #include <functional>
36 #include <vector>
37 
38 namespace yask {
39 
46  // Forward declarations of classes and their pointers.
47  // See yask_compiler_api.hpp for more.
48 
49  class yc_solution;
51  typedef std::shared_ptr<yc_solution> yc_solution_ptr;
52 
53  class yc_var;
55  typedef yc_var* yc_var_ptr;
56 
57  // Forward declarations of expression nodes and their pointers.
58 
59  class yc_expr_node;
61  typedef std::shared_ptr<yc_expr_node> yc_expr_node_ptr;
62 
63  class yc_bool_node;
65  typedef std::shared_ptr<yc_bool_node> yc_bool_node_ptr;
66 
69  typedef std::shared_ptr<yc_number_node> yc_number_node_ptr;
70 
73  typedef std::shared_ptr<yc_index_node> yc_index_node_ptr;
74 
77  typedef std::shared_ptr<yc_equation_node> yc_equation_node_ptr;
78 
81  typedef std::shared_ptr<yc_var_point_node> yc_var_point_node_ptr;
82 
84 }
85 
86 #include "aux/yc_node_api.hpp"
87 
88 namespace yask {
89 
95  class yc_factory {
97  public:
98  virtual ~yc_factory() {}
99 
101 
104  virtual std::string
106 
108 
112  virtual yc_solution_ptr
113  new_solution(const std::string& name ) const;
115  }; // yc_factory.
116 
118 
123  class yc_solution {
124  public:
125  virtual ~yc_solution() {}
126 
128  virtual void
132 
134 
138  virtual std::string
139  get_name() const =0;
140 
142 
145  virtual void
146  set_name(std::string name ) =0;
148 
150 
154  virtual std::string
155  get_description() const =0;
156 
158 
163  virtual void
164  set_description(std::string description ) =0;
166 
168 
173  virtual std::string
174  get_target() =0;
175 
177 
193  virtual void
194  set_target(
195  const std::string& format) =0;
196 
198 
202  virtual bool
203  is_target_set() =0;
204 
206 
207  virtual int
208  get_element_bytes() const =0;
209 
211  virtual void
212  set_element_bytes(int nbytes ) =0;
214 
216 
246  virtual yc_var_ptr
247  new_var(const std::string& name,
250  const std::vector<yc_index_node_ptr>& dims ) =0;
253 
254 #ifndef SWIG
255 
262  virtual yc_var_ptr
263  new_var(const std::string& name ,
266  const std::initializer_list<yc_index_node_ptr>& dims ) =0;
269 #endif
270 
272 
287  virtual yc_var_ptr
288  new_scratch_var(const std::string& name,
291  const std::vector<yc_index_node_ptr>& dims ) =0;
294 
295 #ifndef SWIG
296 
303  virtual yc_var_ptr
304  new_scratch_var(const std::string& name,
308  const std::initializer_list<yc_index_node_ptr>& dims ) =0;
311 #endif
312 
314 
317  virtual int
318  get_num_vars() const =0;
319 
321 
322  virtual std::vector<yc_var_ptr>
323  get_vars() =0;
324 
326 
327  virtual yc_var_ptr
328  get_var(const std::string& name ) =0;
329 
331 
346  virtual void
350  int len ) =0;
351 
353 
357  virtual bool
358  is_folding_set() =0;
359 
361  virtual void
362  clear_folding() =0;
363 
365 
372  virtual void
376  int mult ) =0;
377 
379 
383  virtual bool
384  is_clustering_set() =0;
385 
387  virtual void
388  clear_clustering() =0;
389 
391 
393  virtual int
394  get_num_equations() const =0;
395 
397 
399  virtual std::vector<yc_equation_node_ptr>
400  get_equations() =0;
401 
403 
407  virtual int
409  int level) =0;
410 
412 
416  virtual void
418  int level,
421  int distance) =0;
422 
424 
435  virtual void
436  output_solution(yask_output_ptr output) =0;
439 
440 #ifndef SWIG
441  typedef std::function<void(yc_solution& soln,
444 
446 
458  virtual void
460  output_hook_t hook_fn) =0;
461 #endif
462 
464 
487  virtual void
488  call_after_new_solution(const std::string& code) =0;
492 
494 
498 #define CALL_AFTER_NEW_SOLUTION(...) call_after_new_solution(#__VA_ARGS__)
499 
501 
510  virtual void
511  set_domain_dims(const std::vector<yc_index_node_ptr>& dims ) =0;
513 
514 #ifndef SWIG
515 
521  virtual void
522  set_domain_dims(const std::initializer_list<yc_index_node_ptr>& dims ) =0;
524 #endif
525 
527 
534  virtual void
535  set_step_dim(const yc_index_node_ptr dim) =0;
537 
539 
548  virtual void
549  set_dependency_checker_enabled(bool enable) =0;
551 
553 
556  virtual bool
558 
560 
629  virtual void
632  yc_equation_node_ptr to) =0;
634 
636 
639  virtual void
640  clear_dependencies() =0;
641 
643  inline void
644  format(const std::string& format_type,
645  yask_output_ptr output) {
646  set_target(format_type);
647  output_solution(output);
648  }
649 
651  inline yc_var_ptr
652  new_grid(const std::string& name,
653  const std::vector<yc_index_node_ptr>& dims) {
654  return new_var(name, dims);
655  }
656 
657 #ifndef SWIG
658  inline yc_var_ptr
660  new_grid(const std::string& name,
661  const std::initializer_list<yc_index_node_ptr>& dims) {
662  return new_var(name, dims);
663  }
664 #endif
665 
667  inline yc_var_ptr
668  new_scratch_grid(const std::string& name,
669  const std::vector<yc_index_node_ptr>& dims) {
670  return new_scratch_var(name, dims);
671  }
672 
673 #ifndef SWIG
674  inline yc_var_ptr
676  new_scratch_grid(const std::string& name,
677  const std::initializer_list<yc_index_node_ptr>& dims) {
678  return new_scratch_var(name, dims);
679  }
680 #endif
681 
683  inline int
684  get_num_grids() const {
685  return get_num_vars();
686  }
687 
689  inline std::vector<yc_var_ptr>
691  return get_vars();
692  }
693 
695  inline yc_var_ptr
696  get_grid(const std::string& name) {
697  return get_var(name);
698  }
699  }; // yc_solution.
700 
702 
711  class yc_var {
712  public:
713  virtual ~yc_var() {}
714 
716 
718  virtual const std::string& get_name() const =0;
719 
721 
723  virtual int get_num_dims() const =0;
724 
726 
731  virtual std::vector<std::string>
732  get_dim_names() const =0;
733 
735 
740  virtual yc_var_point_node_ptr
741  new_var_point(const std::vector<yc_number_node_ptr>& index_exprs ) =0;
745 
746 #ifndef SWIG
747 
757  virtual yc_var_point_node_ptr
758  new_var_point(const std::initializer_list<yc_number_node_ptr>& index_exprs) = 0;
759 #endif
760 
762 
777  virtual yc_var_point_node_ptr
778  new_relative_var_point(const std::vector<int>& dim_offsets ) =0;
780 
781 #ifndef SWIG
782 
788  virtual yc_var_point_node_ptr
789  new_relative_var_point(const std::initializer_list<int>& dim_offsets) = 0;
790 #endif
791 
793 
796  virtual bool
797  is_dynamic_step_alloc() const =0;
798 
800 
803  virtual void
804  set_dynamic_step_alloc(bool is_dynamic) =0;
806 
808 
814  virtual idx_t
815  get_step_alloc_size() const =0;
816 
818 
822  virtual void
823  set_step_alloc_size(idx_t size) =0;
825 
827  inline yc_var_point_node_ptr
828  new_grid_point(const std::vector<yc_number_node_ptr>& index_exprs) {
829  return new_var_point(index_exprs);
830  }
832  inline yc_var_point_node_ptr
833  new_grid_point(const std::initializer_list<yc_number_node_ptr>& index_exprs) {
834  return new_var_point(index_exprs);
835  }
837  inline yc_var_point_node_ptr
838  new_relative_grid_point(const std::vector<int>& dim_offsets) {
839  return new_relative_var_point(dim_offsets);
840  }
842  inline yc_var_point_node_ptr
843  new_relative_grid_point(const std::initializer_list<int>& dim_offsets) {
844  return new_relative_var_point(dim_offsets);
845  }
846 
847  }; // yc_var.
848 
850 
882  class yc_var_proxy {
883  private:
884  yc_var_ptr _var;
885 
886  public:
887 
889 
893  yc_var_proxy(const std::string& name,
896  yc_solution_ptr soln,
898  const std::vector< yc_index_node_ptr > &dims,
901  bool is_scratch = false) {
903  if (is_scratch)
904  _var = soln->new_scratch_var(name, dims);
905  else
906  _var = soln->new_var(name, dims);
907  }
908 
909 #ifndef SWIG
910 
916  yc_var_proxy(const std::string& name,
919  yc_solution_ptr soln,
921  const std::initializer_list< yc_index_node_ptr > &dims,
924  bool is_scratch = false) {
926  if (is_scratch)
927  _var = soln->new_scratch_var(name, dims);
928  else
929  _var = soln->new_var(name, dims);
930  }
931 #endif
932 
934 
937  yc_var_proxy(const std::string& name,
940  yc_solution_ptr soln) {
942  _var = soln->new_var(name, { });
943  }
944 
946 
950  yc_var_proxy(yc_var_ptr& var) : _var(var) { }
951 
953  virtual ~yc_var_proxy() { }
954 
956  virtual yc_var_ptr get_var() {
957  return _var;
958  }
959 
961  virtual yc_var_ptr get_var() const {
962  return _var;
963  }
964 
966 
972  virtual yc_var_point_node_ptr
973  operator()(const std::vector<yc_number_node_ptr>& index_exprs) {
974  return _var->new_var_point(index_exprs);
975  }
976 
977 #ifndef SWIG
978 
986  virtual yc_var_point_node_ptr
987  operator()(const std::initializer_list<yc_number_node_ptr>& index_exprs) {
988  return _var->new_var_point(index_exprs);
989  }
990 
992 
1001  const yc_number_any_arg i2 = nullptr,
1002  const yc_number_any_arg i3 = nullptr,
1003  const yc_number_any_arg i4 = nullptr,
1004  const yc_number_any_arg i5 = nullptr,
1005  const yc_number_any_arg i6 = nullptr) {
1006  std::vector<yc_number_node_ptr> args;
1007  if (i1)
1008  args.push_back(i1);
1009  if (i2)
1010  args.push_back(i2);
1011  if (i3)
1012  args.push_back(i3);
1013  if (i4)
1014  args.push_back(i4);
1015  if (i5)
1016  args.push_back(i5);
1017  if (i6)
1018  args.push_back(i6);
1019  return _var->new_var_point(args);
1020  }
1021 
1023 
1030  virtual operator yc_number_ptr_arg() {
1031  return _var->new_var_point({});
1032  }
1033 
1035 
1043  return _var->new_var_point({i1});
1044  }
1045 
1046 #endif
1047 
1048  }; // yc_var_proxy.
1051  typedef yc_var yc_grid;
1059 
1060 } // namespace yask.
1061 
1062 // More solution-based objects.
1063 #include "aux/yc_solution_api.hpp"
virtual void output_solution(yask_output_ptr output)=0
Optimize and the current equation(s) and write to given output object.
Arguments that may be YASK or non-YASK numeric types.
Definition: yc_node_api.hpp:560
virtual yc_var_ptr get_var()
Get the underlying yc_var pointer.
Definition: yask_compiler_api.hpp:956
virtual void clear_dependencies()=0
[Advanced] Remove all existing dependencies.
diff --git a/docs/api/html/yask__kernel__api_8hpp_source.html b/docs/api/html/yask__kernel__api_8hpp_source.html index 6fb3dc89..01a5afd1 100644 --- a/docs/api/html/yask__kernel__api_8hpp_source.html +++ b/docs/api/html/yask__kernel__api_8hpp_source.html @@ -70,7 +70,7 @@
yask_kernel_api.hpp
-Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2020, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_common_api.hpp"
35 #include <vector>
36 #include <cinttypes>
37 
38 #ifndef MPI_VERSION
39 typedef int MPI_Comm;
40 #endif
41 
42 namespace yask {
43 
50  // Forward declarations of classes and pointers.
51 
52  class yk_env;
54  typedef std::shared_ptr<yk_env> yk_env_ptr;
55 
56  class yk_solution;
58  typedef std::shared_ptr<yk_solution> yk_solution_ptr;
59 
60  class yk_var;
62  typedef std::shared_ptr<yk_var> yk_var_ptr;
63 
64  class yk_stats;
66  typedef std::shared_ptr<yk_stats> yk_stats_ptr;
67 
69 } // namespace yask.
70 
71 #include "aux/yk_solution_api.hpp"
72 #include "aux/yk_var_api.hpp"
73 
74 namespace yask {
75 
81  class yk_factory {
83  public:
84  yk_factory();
85  virtual ~yk_factory() {}
86 
88 
91  virtual std::string
93 
95 
123  virtual yk_env_ptr
124  new_env() const;
125 
127 
136  virtual yk_env_ptr
137  new_env(MPI_Comm comm) const;
138 
140 
145  virtual yk_solution_ptr
146  new_solution(yk_env_ptr env ) const;
147 
149 
156  virtual yk_solution_ptr
158  const yk_solution_ptr source ) const;
161  }; // yk_factory.
162 
164 
167  class yk_env {
168  public:
169  virtual ~yk_env() {}
170 
172  virtual void
176 
178 
182  virtual yask_output_ptr
183  get_debug_output() const =0;
184 
186 
189  virtual void
190  set_trace_enabled(bool enable) =0;
191 
193 
196  virtual int get_num_ranks() const =0;
197 
199 
202  virtual int get_rank_index() const =0;
203 
205 
209  virtual void
210  global_barrier() const =0;
211 
212  }; // yk_env.
213 
215  typedef yk_var yk_grid;
218 
221 } // namespace yask.
Statistics from calls to run_solution().
Definition: yk_solution_api.hpp:1040
+Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2021, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_common_api.hpp"
35 #include <vector>
36 #include <cinttypes>
37 
38 #ifndef MPI_VERSION
39 typedef int MPI_Comm;
40 #endif
41 
42 namespace yask {
43 
50  // Forward declarations of classes and pointers.
51 
52  class yk_env;
54  typedef std::shared_ptr<yk_env> yk_env_ptr;
55 
56  class yk_solution;
58  typedef std::shared_ptr<yk_solution> yk_solution_ptr;
59 
60  class yk_var;
62  typedef std::shared_ptr<yk_var> yk_var_ptr;
63 
64  class yk_stats;
66  typedef std::shared_ptr<yk_stats> yk_stats_ptr;
67 
69 } // namespace yask.
70 
71 #include "aux/yk_solution_api.hpp"
72 #include "aux/yk_var_api.hpp"
73 
74 namespace yask {
75 
81  class yk_factory {
83  public:
84  yk_factory();
85  virtual ~yk_factory() {}
86 
88 
91  virtual std::string
93 
95 
123  virtual yk_env_ptr
124  new_env() const;
125 
127 
136  virtual yk_env_ptr
137  new_env(MPI_Comm comm) const;
138 
140 
145  virtual yk_solution_ptr
146  new_solution(yk_env_ptr env ) const;
147 
149 
156  virtual yk_solution_ptr
158  const yk_solution_ptr source ) const;
161  }; // yk_factory.
162 
164 
167  class yk_env {
168  public:
169  virtual ~yk_env() {}
170 
172  virtual void
176 
178 
182  virtual yask_output_ptr
183  get_debug_output() const =0;
184 
186 
189  virtual void
190  set_trace_enabled(bool enable) =0;
191 
193 
196  virtual int get_num_ranks() const =0;
197 
199 
202  virtual int get_rank_index() const =0;
203 
205 
209  virtual void
210  global_barrier() const =0;
211 
212  }; // yk_env.
213 
215  typedef yk_var yk_grid;
218 
221 } // namespace yask.
Statistics from calls to run_solution().
Definition: yk_solution_api.hpp:1040
std::shared_ptr< yk_stats > yk_stats_ptr
Shared pointer to yk_stats.
Definition: yask_kernel_api.hpp:64
Kernel environment.
Definition: yask_kernel_api.hpp:167
virtual yk_env_ptr new_env() const
Create an object to hold environment information.
diff --git a/docs/api/html/yc__node__api_8hpp_source.html b/docs/api/html/yc__node__api_8hpp_source.html index 36b43d45..988c9908 100644 --- a/docs/api/html/yc__node__api_8hpp_source.html +++ b/docs/api/html/yc__node__api_8hpp_source.html @@ -70,7 +70,7 @@
yc_node_api.hpp
-Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2020, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 namespace yask {
35 
41  // More node types not exposed except via RTTI.
42 
45  typedef std::shared_ptr<yc_const_number_node> yc_const_number_node_ptr;
46 
49  typedef std::shared_ptr<yc_negate_node> yc_negate_node_ptr;
50 
53  typedef std::shared_ptr<yc_commutative_number_node> yc_commutative_number_node_ptr;
54 
57  typedef std::shared_ptr<yc_binary_number_node> yc_binary_number_node_ptr;
58 
61  typedef std::shared_ptr<yc_binary_bool_node> yc_binary_bool_node_ptr;
62 
65  typedef std::shared_ptr<yc_binary_comparison_node> yc_binary_comparison_node_ptr;
66 
67  class yc_add_node;
69  typedef std::shared_ptr<yc_add_node> yc_add_node_ptr;
70 
73  typedef std::shared_ptr<yc_multiply_node> yc_multiply_node_ptr;
74 
77  typedef std::shared_ptr<yc_subtract_node> yc_subtract_node_ptr;
78 
81  typedef std::shared_ptr<yc_divide_node> yc_divide_node_ptr;
82 
83  class yc_mod_node;
85  typedef std::shared_ptr<yc_mod_node> yc_mod_node_ptr;
86 
87  class yc_not_node;
89  typedef std::shared_ptr<yc_not_node> yc_not_node_ptr;
90 
93  typedef std::shared_ptr<yc_equals_node> yc_equals_node_ptr;
94 
97  typedef std::shared_ptr<yc_not_equals_node> yc_not_equals_node_ptr;
98 
101  typedef std::shared_ptr<yc_less_than_node> yc_less_than_node_ptr;
102 
105  typedef std::shared_ptr<yc_greater_than_node> yc_greater_than_node_ptr;
106 
109  typedef std::shared_ptr<yc_not_less_than_node> yc_not_less_than_node_ptr;
110 
113  typedef std::shared_ptr<yc_not_greater_than_node> yc_not_greater_than_node_ptr;
114 
115  class yc_and_node;
117  typedef std::shared_ptr<yc_and_node> yc_and_node_ptr;
118 
119  class yc_or_node;
121  typedef std::shared_ptr<yc_or_node> yc_or_node_ptr;
122 
124 
125  class yc_expr_node {
126  public:
127  virtual ~yc_expr_node() {}
128 
130 
134  virtual std::string format_simple() const =0;
135 
137 
141  virtual int get_num_nodes() const =0;
142  };
143 
145 
149  class yc_equation_node : public virtual yc_expr_node {
150  public:
151 
153 
154  virtual yc_var_point_node_ptr get_lhs() =0;
155 
157 
158  virtual yc_number_node_ptr get_rhs() =0;
159 
161 
163  virtual yc_bool_node_ptr get_cond() =0;
164 
166 
207  virtual void set_cond(yc_bool_node_ptr sub_domain_cond ) =0;
211 
213 
236  virtual void set_step_cond(yc_bool_node_ptr step_cond ) =0;
240 
242  virtual yc_equation_node_ptr clone_ast() const =0;
243  };
244 
246 
247  class yc_number_node : public virtual yc_expr_node {
248  public:
249 
251  virtual yc_number_node_ptr clone_ast() const =0;
252  };
253 
255 
256  class yc_bool_node : public virtual yc_expr_node {
257  public:
258 
260  virtual yc_bool_node_ptr clone_ast() const =0;
261  };
262 
264 
270  class yc_index_node : public virtual yc_number_node {
271  public:
272 
274 
275  virtual const std::string&
276  get_name() const =0;
277  };
278 
280 
283  class yc_var_point_node : public virtual yc_number_node {
284  public:
285 
287 
288  virtual yc_var_ptr
289  get_var() =0;
290 
292  inline yc_var_ptr
294  return get_var();
295  }
296  };
297 
299 
303  class yc_const_number_node : public virtual yc_number_node {
304  public:
305 
307 
309  virtual void
310  set_value(double val ) =0;
311 
313 
314  virtual double
315  get_value() const =0;
316  };
317 
319 
322  class yc_negate_node : public virtual yc_number_node {
323  public:
324 
326 
329  virtual yc_number_node_ptr
330  get_rhs() =0;
331  };
332 
334 
337  public:
338 
340 
345  virtual int
346  get_num_operands() =0;
347 
349 
350  virtual std::vector<yc_number_node_ptr>
351  get_operands() =0;
352 
354  virtual void
356  };
357 
359 
360  class yc_add_node : public virtual yc_commutative_number_node { };
361 
363 
364  class yc_multiply_node : public virtual yc_commutative_number_node { };
365 
367 
369  class yc_binary_number_node : public virtual yc_number_node {
370  public:
371 
373  virtual yc_number_node_ptr
374  get_lhs() =0;
375 
377  virtual yc_number_node_ptr
378  get_rhs() =0;
379  };
380 
382 
383  class yc_subtract_node : public virtual yc_binary_number_node { };
384 
386 
387  class yc_divide_node : public virtual yc_binary_number_node { };
388 
390 
391  class yc_mod_node : public virtual yc_binary_number_node { };
392 
394 
397  class yc_not_node : public virtual yc_bool_node {
398  public:
399 
401 
402  virtual yc_bool_node_ptr
403  get_rhs() =0;
404  };
405 
407  class yc_binary_bool_node : public virtual yc_bool_node {
408  public:
409 
411  virtual yc_bool_node_ptr
412  get_lhs() =0;
413 
415  virtual yc_bool_node_ptr
416  get_rhs() =0;
417  };
418 
420 
423  class yc_and_node : public virtual yc_binary_bool_node { };
424 
426 
429  class yc_or_node : public virtual yc_binary_bool_node { };
430 
432  class yc_binary_comparison_node : public virtual yc_bool_node {
433  public:
434 
436 
437  virtual yc_number_node_ptr
438  get_lhs() =0;
439 
441 
442  virtual yc_number_node_ptr
443  get_rhs() =0;
444  };
445 
447 
450  class yc_equals_node : public virtual yc_binary_comparison_node { };
451 
453 
456  class yc_not_equals_node : public virtual yc_binary_comparison_node { };
457 
459 
462  class yc_less_than_node : public virtual yc_binary_comparison_node { };
463 
465 
469 
471 
475 
477 
481 
482 #ifndef SWIG
483 
495 
496  public:
497 
500  yc_number_node_ptr(p) { }
501 
504  yc_number_node_ptr(p) { }
505 
508  yc_number_node_ptr(p) { }
509  };
510 
512 
523 
524  protected:
525 
527  yc_number_node_ptr _convert_const(double val) const;
528 
529  public:
530 
534 
538 
542 
546  };
547 
549 
561 
562  protected:
563 
565  yc_number_node_ptr _convert_const(double val) const;
566 
567  public:
568 
571  yc_number_node_ptr(p) { }
572 
575  yc_number_node_ptr(p) { }
576 
579  yc_number_node_ptr(p) { }
580 
584 
588 
590  yc_number_any_arg(double f) :
592 
594  yc_number_any_arg(float f) :
596 
598  yc_number_any_arg(std::nullptr_t p) :
599  yc_number_node_ptr(p) { }
600  };
601 #endif
602 
604 
607  public:
608  virtual ~yc_node_factory() {}
609 
611 
617  virtual yc_index_node_ptr
618  new_step_index(const std::string& name ) const;
620 
622 
634  virtual yc_index_node_ptr
635  new_domain_index(const std::string& name ) const;
637 
639 
647  virtual yc_index_node_ptr
648  new_misc_index(const std::string& name ) const;
650 
652 
678  virtual yc_equation_node_ptr
681  yc_number_node_ptr rhs,
683  yc_bool_node_ptr sub_domain_cond = nullptr ) const;
686 
687 #ifndef SWIG
688 
694  virtual yc_number_node_ptr
697  return std::move(arg);
698  }
699 #endif
700 
702 
708  virtual yc_number_node_ptr
709  new_const_number_node(double val ) const;
711 
713 
719  virtual yc_number_node_ptr
720  new_const_number_node(idx_t val ) const;
722 
724 
729  virtual yc_number_node_ptr
732 
734 
740  virtual yc_number_node_ptr
742  yc_number_node_ptr rhs ) const;
743 
745 
751  virtual yc_number_node_ptr
753  yc_number_node_ptr rhs ) const;
754 
756 
766  virtual yc_number_node_ptr
768  yc_number_node_ptr rhs ) const;
769 
771 
778  virtual yc_number_node_ptr
780  yc_number_node_ptr rhs ) const;
781 
783 
790  virtual yc_number_node_ptr
792  yc_number_node_ptr rhs ) const;
793 
795 
804  virtual yc_number_node_ptr
807 
809 
818  virtual yc_number_node_ptr
821 
823 
829  virtual yc_bool_node_ptr
830  new_not_node(yc_bool_node_ptr rhs ) const;
831 
833 
839  virtual yc_bool_node_ptr
841  yc_bool_node_ptr rhs ) const;
842 
844 
850  virtual yc_bool_node_ptr
852  yc_bool_node_ptr rhs ) const;
853 
855 
860  virtual yc_bool_node_ptr
862  yc_number_node_ptr rhs ) const;
863 
865 
870  virtual yc_bool_node_ptr
872  yc_number_node_ptr rhs ) const;
873 
875 
880  virtual yc_bool_node_ptr
882  yc_number_node_ptr rhs ) const;
883 
885 
890  virtual yc_bool_node_ptr
892  yc_number_node_ptr rhs ) const;
893 
895 
900  virtual yc_bool_node_ptr
902  yc_number_node_ptr rhs ) const;
903 
905 
910  virtual yc_bool_node_ptr
912  yc_number_node_ptr rhs ) const;
913 
914  };
915 
917 #define UNARY_MATH_EXPR(fn_name) \
918  yc_number_node_ptr fn_name(const yc_number_node_ptr rhs)
919 
921  UNARY_MATH_EXPR(sqrt);
923  UNARY_MATH_EXPR(cbrt);
925  UNARY_MATH_EXPR(fabs);
927  UNARY_MATH_EXPR(erf);
929  UNARY_MATH_EXPR(exp);
931  UNARY_MATH_EXPR(log);
933  UNARY_MATH_EXPR(sin);
935  UNARY_MATH_EXPR(cos);
937  UNARY_MATH_EXPR(atan);
938 #undef UNARY_MATH_EXPR
939 
941 #define BINARY_MATH_EXPR(fn_name) \
942  yc_number_node_ptr fn_name(const yc_number_node_ptr arg1, const yc_number_node_ptr arg2); \
943  yc_number_node_ptr fn_name(double arg1, const yc_number_node_ptr arg2); \
944  yc_number_node_ptr fn_name(const yc_number_node_ptr arg1, double arg2)
945 
947 
951  BINARY_MATH_EXPR(pow);
952 #undef BINARY_MATH_EXPR
953 
954 #if !defined SWIG
955 
956  // Non-class operators.
957  // These are not defined for SWIG because
958  // the Python operators are defined in the ".i" file.
959  // For the binary operators, we define 3 combinations to implicitly
960  // avoid the const-const combinations, which conflict with built-in
961  // operators on fundamental C++ types, e.g., '5+8'.
962 
964  yc_number_node_ptr operator-(yc_number_ptr_arg rhs);
965 
967  yc_number_node_ptr operator+(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
969  yc_number_node_ptr operator+(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
971  yc_number_node_ptr operator+(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
972 
974  yc_number_node_ptr operator/(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
976  yc_number_node_ptr operator/(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
978  yc_number_node_ptr operator/(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
979 
981  yc_number_node_ptr operator%(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
983  yc_number_node_ptr operator%(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
985  yc_number_node_ptr operator%(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
986 
988  yc_number_node_ptr operator*(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
990  yc_number_node_ptr operator*(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
992  yc_number_node_ptr operator*(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
993 
995  yc_number_node_ptr operator-(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
997  yc_number_node_ptr operator-(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
999  yc_number_node_ptr operator-(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
1000 
1004  void operator+=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1005 
1009  void operator-=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1010 
1014  void operator*=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1015 
1019  void operator/=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1020 
1022 
1024 
1026 
1028 
1030 
1032 
1034 
1040 #define BOOL_OPER(oper, fn) \
1041  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_number_node_ptr rhs) { \
1042  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1043  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_index_node_ptr rhs) { \
1044  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1045  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1046  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1047  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_number_node_ptr rhs) { \
1048  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1049  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_index_node_ptr rhs) { \
1050  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1051  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1052  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1053  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_number_node_ptr rhs) { \
1054  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1055  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_index_node_ptr rhs) { \
1056  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1057  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1058  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1059  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, double rhs) { \
1060  yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); } \
1061  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, double rhs) { \
1062  yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); } \
1063  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, double rhs) { \
1064  yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); }
1065 
1066  BOOL_OPER(==, new_equals_node)
1067  BOOL_OPER(!=, new_not_equals_node)
1068  BOOL_OPER(<, new_less_than_node)
1069  BOOL_OPER(>, new_greater_than_node)
1070  BOOL_OPER(<=, new_not_greater_than_node)
1071  BOOL_OPER(>=, new_not_less_than_node)
1072 #undef BOOL_OPER
1073 
1075 
1083 #define EQUALS <<
1084 
1086  yc_equation_node_ptr operator EQUALS(yc_var_point_node_ptr gpp, const yc_number_any_arg rhs);
1087 
1089 
1093 #define IF_DOMAIN ^=
1094 
1097  const yc_bool_node_ptr cond);
1098 
1100 
1104 #define IF_STEP |=
1105 
1108  const yc_bool_node_ptr cond);
1109 
1110 #endif // !SWIG.
1111 
1114 } // namespace yask.
virtual yc_bool_node_ptr get_rhs()=0
Get the [only] operand.
+Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2021, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 namespace yask {
35 
41  // More node types not exposed except via RTTI.
42 
45  typedef std::shared_ptr<yc_const_number_node> yc_const_number_node_ptr;
46 
49  typedef std::shared_ptr<yc_negate_node> yc_negate_node_ptr;
50 
53  typedef std::shared_ptr<yc_commutative_number_node> yc_commutative_number_node_ptr;
54 
57  typedef std::shared_ptr<yc_binary_number_node> yc_binary_number_node_ptr;
58 
61  typedef std::shared_ptr<yc_binary_bool_node> yc_binary_bool_node_ptr;
62 
65  typedef std::shared_ptr<yc_binary_comparison_node> yc_binary_comparison_node_ptr;
66 
67  class yc_add_node;
69  typedef std::shared_ptr<yc_add_node> yc_add_node_ptr;
70 
73  typedef std::shared_ptr<yc_multiply_node> yc_multiply_node_ptr;
74 
77  typedef std::shared_ptr<yc_subtract_node> yc_subtract_node_ptr;
78 
81  typedef std::shared_ptr<yc_divide_node> yc_divide_node_ptr;
82 
83  class yc_mod_node;
85  typedef std::shared_ptr<yc_mod_node> yc_mod_node_ptr;
86 
87  class yc_not_node;
89  typedef std::shared_ptr<yc_not_node> yc_not_node_ptr;
90 
93  typedef std::shared_ptr<yc_equals_node> yc_equals_node_ptr;
94 
97  typedef std::shared_ptr<yc_not_equals_node> yc_not_equals_node_ptr;
98 
101  typedef std::shared_ptr<yc_less_than_node> yc_less_than_node_ptr;
102 
105  typedef std::shared_ptr<yc_greater_than_node> yc_greater_than_node_ptr;
106 
109  typedef std::shared_ptr<yc_not_less_than_node> yc_not_less_than_node_ptr;
110 
113  typedef std::shared_ptr<yc_not_greater_than_node> yc_not_greater_than_node_ptr;
114 
115  class yc_and_node;
117  typedef std::shared_ptr<yc_and_node> yc_and_node_ptr;
118 
119  class yc_or_node;
121  typedef std::shared_ptr<yc_or_node> yc_or_node_ptr;
122 
124 
125  class yc_expr_node {
126  public:
127  virtual ~yc_expr_node() {}
128 
130 
134  virtual std::string format_simple() const =0;
135 
137 
141  virtual int get_num_nodes() const =0;
142  };
143 
145 
149  class yc_equation_node : public virtual yc_expr_node {
150  public:
151 
153 
154  virtual yc_var_point_node_ptr get_lhs() =0;
155 
157 
158  virtual yc_number_node_ptr get_rhs() =0;
159 
161 
163  virtual yc_bool_node_ptr get_cond() =0;
164 
166 
207  virtual void set_cond(yc_bool_node_ptr sub_domain_cond ) =0;
211 
213 
236  virtual void set_step_cond(yc_bool_node_ptr step_cond ) =0;
240 
242  virtual yc_equation_node_ptr clone_ast() const =0;
243  };
244 
246 
247  class yc_number_node : public virtual yc_expr_node {
248  public:
249 
251  virtual yc_number_node_ptr clone_ast() const =0;
252  };
253 
255 
256  class yc_bool_node : public virtual yc_expr_node {
257  public:
258 
260  virtual yc_bool_node_ptr clone_ast() const =0;
261  };
262 
264 
270  class yc_index_node : public virtual yc_number_node {
271  public:
272 
274 
275  virtual const std::string&
276  get_name() const =0;
277  };
278 
280 
283  class yc_var_point_node : public virtual yc_number_node {
284  public:
285 
287 
288  virtual yc_var_ptr
289  get_var() =0;
290 
292  inline yc_var_ptr
294  return get_var();
295  }
296  };
297 
299 
303  class yc_const_number_node : public virtual yc_number_node {
304  public:
305 
307 
309  virtual void
310  set_value(double val ) =0;
311 
313 
314  virtual double
315  get_value() const =0;
316  };
317 
319 
322  class yc_negate_node : public virtual yc_number_node {
323  public:
324 
326 
329  virtual yc_number_node_ptr
330  get_rhs() =0;
331  };
332 
334 
337  public:
338 
340 
345  virtual int
346  get_num_operands() =0;
347 
349 
350  virtual std::vector<yc_number_node_ptr>
351  get_operands() =0;
352 
354  virtual void
356  };
357 
359 
360  class yc_add_node : public virtual yc_commutative_number_node { };
361 
363 
364  class yc_multiply_node : public virtual yc_commutative_number_node { };
365 
367 
369  class yc_binary_number_node : public virtual yc_number_node {
370  public:
371 
373  virtual yc_number_node_ptr
374  get_lhs() =0;
375 
377  virtual yc_number_node_ptr
378  get_rhs() =0;
379  };
380 
382 
383  class yc_subtract_node : public virtual yc_binary_number_node { };
384 
386 
387  class yc_divide_node : public virtual yc_binary_number_node { };
388 
390 
391  class yc_mod_node : public virtual yc_binary_number_node { };
392 
394 
397  class yc_not_node : public virtual yc_bool_node {
398  public:
399 
401 
402  virtual yc_bool_node_ptr
403  get_rhs() =0;
404  };
405 
407  class yc_binary_bool_node : public virtual yc_bool_node {
408  public:
409 
411  virtual yc_bool_node_ptr
412  get_lhs() =0;
413 
415  virtual yc_bool_node_ptr
416  get_rhs() =0;
417  };
418 
420 
423  class yc_and_node : public virtual yc_binary_bool_node { };
424 
426 
429  class yc_or_node : public virtual yc_binary_bool_node { };
430 
432  class yc_binary_comparison_node : public virtual yc_bool_node {
433  public:
434 
436 
437  virtual yc_number_node_ptr
438  get_lhs() =0;
439 
441 
442  virtual yc_number_node_ptr
443  get_rhs() =0;
444  };
445 
447 
450  class yc_equals_node : public virtual yc_binary_comparison_node { };
451 
453 
456  class yc_not_equals_node : public virtual yc_binary_comparison_node { };
457 
459 
462  class yc_less_than_node : public virtual yc_binary_comparison_node { };
463 
465 
469 
471 
475 
477 
481 
482 #ifndef SWIG
483 
495 
496  public:
497 
500  yc_number_node_ptr(p) { }
501 
504  yc_number_node_ptr(p) { }
505 
508  yc_number_node_ptr(p) { }
509  };
510 
512 
523 
524  protected:
525 
527  yc_number_node_ptr _convert_const(double val) const;
528 
529  public:
530 
534 
538 
542 
546  };
547 
549 
561 
562  protected:
563 
565  yc_number_node_ptr _convert_const(double val) const;
566 
567  public:
568 
571  yc_number_node_ptr(p) { }
572 
575  yc_number_node_ptr(p) { }
576 
579  yc_number_node_ptr(p) { }
580 
584 
588 
590  yc_number_any_arg(double f) :
592 
594  yc_number_any_arg(float f) :
596 
598  yc_number_any_arg(std::nullptr_t p) :
599  yc_number_node_ptr(p) { }
600  };
601 #endif
602 
604 
607  public:
608  virtual ~yc_node_factory() {}
609 
611 
617  virtual yc_index_node_ptr
618  new_step_index(const std::string& name ) const;
620 
622 
634  virtual yc_index_node_ptr
635  new_domain_index(const std::string& name ) const;
637 
639 
647  virtual yc_index_node_ptr
648  new_misc_index(const std::string& name ) const;
650 
652 
678  virtual yc_equation_node_ptr
681  yc_number_node_ptr rhs,
683  yc_bool_node_ptr sub_domain_cond = nullptr ) const;
686 
687 #ifndef SWIG
688 
694  virtual yc_number_node_ptr
697  return std::move(arg);
698  }
699 #endif
700 
702 
708  virtual yc_number_node_ptr
709  new_const_number_node(double val ) const;
711 
713 
719  virtual yc_number_node_ptr
720  new_const_number_node(idx_t val ) const;
722 
724 
729  virtual yc_number_node_ptr
732 
734 
740  virtual yc_number_node_ptr
742  yc_number_node_ptr rhs ) const;
743 
745 
751  virtual yc_number_node_ptr
753  yc_number_node_ptr rhs ) const;
754 
756 
766  virtual yc_number_node_ptr
768  yc_number_node_ptr rhs ) const;
769 
771 
778  virtual yc_number_node_ptr
780  yc_number_node_ptr rhs ) const;
781 
783 
790  virtual yc_number_node_ptr
792  yc_number_node_ptr rhs ) const;
793 
795 
804  virtual yc_number_node_ptr
807 
809 
818  virtual yc_number_node_ptr
821 
823 
829  virtual yc_bool_node_ptr
830  new_not_node(yc_bool_node_ptr rhs ) const;
831 
833 
839  virtual yc_bool_node_ptr
841  yc_bool_node_ptr rhs ) const;
842 
844 
850  virtual yc_bool_node_ptr
852  yc_bool_node_ptr rhs ) const;
853 
855 
860  virtual yc_bool_node_ptr
862  yc_number_node_ptr rhs ) const;
863 
865 
870  virtual yc_bool_node_ptr
872  yc_number_node_ptr rhs ) const;
873 
875 
880  virtual yc_bool_node_ptr
882  yc_number_node_ptr rhs ) const;
883 
885 
890  virtual yc_bool_node_ptr
892  yc_number_node_ptr rhs ) const;
893 
895 
900  virtual yc_bool_node_ptr
902  yc_number_node_ptr rhs ) const;
903 
905 
910  virtual yc_bool_node_ptr
912  yc_number_node_ptr rhs ) const;
913 
914  };
915 
917 #define UNARY_MATH_EXPR(fn_name) \
918  yc_number_node_ptr fn_name(const yc_number_node_ptr rhs)
919 
921  UNARY_MATH_EXPR(sqrt);
923  UNARY_MATH_EXPR(cbrt);
925  UNARY_MATH_EXPR(fabs);
927  UNARY_MATH_EXPR(erf);
929  UNARY_MATH_EXPR(exp);
931  UNARY_MATH_EXPR(log);
933  UNARY_MATH_EXPR(sin);
935  UNARY_MATH_EXPR(cos);
937  UNARY_MATH_EXPR(atan);
938 #undef UNARY_MATH_EXPR
939 
941 #define BINARY_MATH_EXPR(fn_name) \
942  yc_number_node_ptr fn_name(const yc_number_node_ptr arg1, const yc_number_node_ptr arg2); \
943  yc_number_node_ptr fn_name(double arg1, const yc_number_node_ptr arg2); \
944  yc_number_node_ptr fn_name(const yc_number_node_ptr arg1, double arg2)
945 
947 
951  BINARY_MATH_EXPR(pow);
952 #undef BINARY_MATH_EXPR
953 
954 #if !defined SWIG
955 
956  // Non-class operators.
957  // These are not defined for SWIG because
958  // the Python operators are defined in the ".i" file.
959  // For the binary operators, we define 3 combinations to implicitly
960  // avoid the const-const combinations, which conflict with built-in
961  // operators on fundamental C++ types, e.g., '5+8'.
962 
964  yc_number_node_ptr operator-(yc_number_ptr_arg rhs);
965 
967  yc_number_node_ptr operator+(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
969  yc_number_node_ptr operator+(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
971  yc_number_node_ptr operator+(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
972 
974  yc_number_node_ptr operator/(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
976  yc_number_node_ptr operator/(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
978  yc_number_node_ptr operator/(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
979 
981  yc_number_node_ptr operator%(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
983  yc_number_node_ptr operator%(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
985  yc_number_node_ptr operator%(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
986 
988  yc_number_node_ptr operator*(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
990  yc_number_node_ptr operator*(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
992  yc_number_node_ptr operator*(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
993 
995  yc_number_node_ptr operator-(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs);
997  yc_number_node_ptr operator-(yc_number_const_arg lhs, yc_number_ptr_arg rhs);
999  yc_number_node_ptr operator-(yc_number_ptr_arg lhs, yc_number_const_arg rhs);
1000 
1004  void operator+=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1005 
1009  void operator-=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1010 
1014  void operator*=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1015 
1019  void operator/=(yc_number_node_ptr& lhs, yc_number_const_arg rhs);
1020 
1022 
1024 
1026 
1028 
1030 
1032 
1034 
1040 #define BOOL_OPER(oper, fn) \
1041  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_number_node_ptr rhs) { \
1042  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1043  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_index_node_ptr rhs) { \
1044  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1045  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1046  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1047  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_number_node_ptr rhs) { \
1048  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1049  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_index_node_ptr rhs) { \
1050  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1051  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1052  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1053  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_number_node_ptr rhs) { \
1054  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1055  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_index_node_ptr rhs) { \
1056  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1057  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1058  yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1059  inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, double rhs) { \
1060  yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); } \
1061  inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, double rhs) { \
1062  yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); } \
1063  inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, double rhs) { \
1064  yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); }
1065 
1066  BOOL_OPER(==, new_equals_node)
1067  BOOL_OPER(!=, new_not_equals_node)
1068  BOOL_OPER(<, new_less_than_node)
1069  BOOL_OPER(>, new_greater_than_node)
1070  BOOL_OPER(<=, new_not_greater_than_node)
1071  BOOL_OPER(>=, new_not_less_than_node)
1072 #undef BOOL_OPER
1073 
1075 
1083 #define EQUALS <<
1084 
1086  yc_equation_node_ptr operator EQUALS(yc_var_point_node_ptr gpp, const yc_number_any_arg rhs);
1087 
1089 
1093 #define IF_DOMAIN ^=
1094 
1097  const yc_bool_node_ptr cond);
1098 
1100 
1104 #define IF_STEP |=
1105 
1108  const yc_bool_node_ptr cond);
1109 
1110 #endif // !SWIG.
1111 
1114 } // namespace yask.
virtual yc_bool_node_ptr get_rhs()=0
Get the [only] operand.
virtual yc_bool_node_ptr new_not_equals_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a numerical-comparison 'not-equals' node.
Base class for boolean binary operators that take boolean inputs.
Definition: yc_node_api.hpp:407
std::shared_ptr< yc_commutative_number_node > yc_commutative_number_node_ptr
Shared pointer to yc_commutative_number_node.
Definition: yc_node_api.hpp:51
diff --git a/docs/api/html/yc__solution__api_8hpp_source.html b/docs/api/html/yc__solution__api_8hpp_source.html index 137ebeaa..039c7b0f 100644 --- a/docs/api/html/yc__solution__api_8hpp_source.html +++ b/docs/api/html/yc__solution__api_8hpp_source.html @@ -70,7 +70,7 @@
yc_solution_api.hpp
-Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2020, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
26 // This file contains a base class and macros to create
27 // stencils to be included in the YASK compiler binary utility.
28 
29 // This file uses Doxygen 1.8 markup for API documentation-generation.
30 // See http://www.stack.nl/~dimitri/doxygen.
33 #pragma once
34 
35 // Standard headers.
36 #include <cassert>
37 #include <map>
38 
39 namespace yask {
40 
46 
58 
59  public:
61  typedef std::map<std::string, yc_solution_base*> soln_map;
62 
63  private:
64 
66  yc_solution_ptr _soln;
67 
69  yc_factory _yc_factory;
70 
72  yc_node_factory _node_factory;
73 
74  public:
75 
77 
82  yc_solution_base(const std::string& name);
83 
85 
91 
93  virtual ~yc_solution_base() { }
94 
96 
99  static soln_map& get_registry();
100 
102 
117  virtual void
118  define();
119 
121  inline yc_solution_ptr
123  return _soln;
124  }
125 
127  inline yc_index_node_ptr
128  new_step_index(const std::string& name) {
129  return _node_factory.new_step_index(name);
130  }
131 
133  inline yc_index_node_ptr
134  new_domain_index(const std::string& name) {
135  return _node_factory.new_domain_index(name);
136  }
137 
139  inline yc_index_node_ptr
140  new_misc_index(const std::string& name) {
141  return _node_factory.new_misc_index(name);
142  }
143 
145  inline yc_number_node_ptr
147  return _node_factory.new_number_node(arg);
148  }
149 
151  inline yc_number_node_ptr
153  return _node_factory.new_first_domain_index(dim);
154  }
155 
157  inline yc_number_node_ptr
159  return _node_factory.new_last_domain_index(dim);
160  }
161  };
162 
164 
172  private:
173 
175  int _radius;
176 
177  public:
179  yc_solution_with_radius_base(const std::string& name, int radius) :
180  yc_solution_base(name) {
181  set_radius(radius);
182  }
183 
185 
188  virtual void
189  define() override;
190 
192 
197  virtual bool
198  set_radius(int radius) {
199  _radius = radius;
200  auto soln = get_soln();
201  soln->set_description(soln->get_name() + " radius " + std::to_string(radius));
202  return radius >= 0; // support only non-neg. radius.
203  }
204 
206 
209  virtual int
210  get_radius() const {
211  return _radius;
212  }
213  };
214 
217 } // namespace yask.
virtual ~yc_solution_base()
Destructor.
Definition: yc_solution_api.hpp:93
+Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2021, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
26 // This file contains a base class and macros to create
27 // stencils to be included in the YASK compiler binary utility.
28 
29 // This file uses Doxygen 1.8 markup for API documentation-generation.
30 // See http://www.stack.nl/~dimitri/doxygen.
33 #pragma once
34 
35 // Standard headers.
36 #include <cassert>
37 #include <map>
38 
39 namespace yask {
40 
46 
58 
59  public:
61  typedef std::map<std::string, yc_solution_base*> soln_map;
62 
63  private:
64 
66  yc_solution_ptr _soln;
67 
69  yc_factory _yc_factory;
70 
72  yc_node_factory _node_factory;
73 
74  public:
75 
77 
82  yc_solution_base(const std::string& name);
83 
85 
91 
93  virtual ~yc_solution_base() { }
94 
96 
99  static soln_map& get_registry();
100 
102 
117  virtual void
118  define();
119 
121  inline yc_solution_ptr
123  return _soln;
124  }
125 
127  inline yc_index_node_ptr
128  new_step_index(const std::string& name) {
129  return _node_factory.new_step_index(name);
130  }
131 
133  inline yc_index_node_ptr
134  new_domain_index(const std::string& name) {
135  return _node_factory.new_domain_index(name);
136  }
137 
139  inline yc_index_node_ptr
140  new_misc_index(const std::string& name) {
141  return _node_factory.new_misc_index(name);
142  }
143 
145  inline yc_number_node_ptr
147  return _node_factory.new_number_node(arg);
148  }
149 
151  inline yc_number_node_ptr
153  return _node_factory.new_first_domain_index(dim);
154  }
155 
157  inline yc_number_node_ptr
159  return _node_factory.new_last_domain_index(dim);
160  }
161  };
162 
164 
172  private:
173 
175  int _radius;
176 
177  public:
179  yc_solution_with_radius_base(const std::string& name, int radius) :
180  yc_solution_base(name) {
181  set_radius(radius);
182  }
183 
185 
188  virtual void
189  define() override;
190 
192 
197  virtual bool
198  set_radius(int radius) {
199  _radius = radius;
200  auto soln = get_soln();
201  soln->set_description(soln->get_name() + " radius " + std::to_string(radius));
202  return radius >= 0; // support only non-neg. radius.
203  }
204 
206 
209  virtual int
210  get_radius() const {
211  return _radius;
212  }
213  };
214 
217 } // namespace yask.
virtual ~yc_solution_base()
Destructor.
Definition: yc_solution_api.hpp:93
Arguments that may be YASK or non-YASK numeric types.
Definition: yc_node_api.hpp:560
Factory to create AST nodes.
Definition: yc_node_api.hpp:606
yc_index_node_ptr new_step_index(const std::string &name)
A simple wrapper for yc_node_factory::new_step_index().
Definition: yc_solution_api.hpp:128
diff --git a/docs/api/html/yk__solution__api_8hpp_source.html b/docs/api/html/yk__solution__api_8hpp_source.html index b66caa33..46b9b7ec 100644 --- a/docs/api/html/yk__solution__api_8hpp_source.html +++ b/docs/api/html/yk__solution__api_8hpp_source.html @@ -70,7 +70,7 @@
yk_solution_api.hpp
-Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2020, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_kernel_api.hpp"
35 
36 namespace yask {
37 
43 
49  const int yask_numa_local = -1;
50 
52 
57  const int yask_numa_interleave = -2;
58 
60 
65  const int yask_numa_none = -9;
66 
68 
74  class yk_solution {
75  public:
76  virtual ~yk_solution() {}
77 
79 
83  virtual void
87 
89 
92  virtual const std::string&
93  get_name() const =0;
94 
96 
101  virtual std::string
102  get_target() const =0;
103 
105 
108  virtual int
109  get_element_bytes() const =0;
110 
112 
117  virtual std::string
118  get_step_dim_name() const =0;
119 
121 
127  virtual int
128  get_num_domain_dims() const =0;
129 
131 
136  virtual std::vector<std::string>
137  get_domain_dim_names() const =0;
138 
140 
148  virtual std::vector<std::string>
149  get_misc_dim_names() const =0;
150 
152 
175  virtual void
176  set_rank_domain_size(const std::string& dim,
179  idx_t size ) =0;
180 
182 
192  virtual idx_t
193  get_rank_domain_size(const std::string& dim) const =0;
196 
198 
208  virtual void
209  set_overall_domain_size(const std::string& dim,
212  idx_t size ) =0;
213 
215 
228  virtual idx_t
229  get_overall_domain_size(const std::string& dim ) const =0;
232 
234 
251  virtual void
252  set_block_size(const std::string& dim,
256  idx_t size ) =0;
258 
260 
265  virtual idx_t
266  get_block_size(const std::string& dim) const =0;
270 
272 
299  virtual void
300  set_num_ranks(const std::string& dim,
303  idx_t num ) =0;
304 
306 
309  virtual idx_t
310  get_num_ranks(const std::string& dim) const =0;
313 
315 
336  virtual void
337  set_rank_index(const std::string& dim,
340  idx_t num ) =0;
341 
343 
348  virtual idx_t
349  get_rank_index(const std::string& dim ) const =0;
352 
354 
368  virtual std::string
369  apply_command_line_options(const std::string& args ) =0;
371 
373 
380  virtual std::string
381  apply_command_line_options(int argc, char* argv[]) =0;
382 
384 
390  virtual std::string
391  apply_command_line_options(const std::vector<std::string>& args) =0;
392 
394 
401  virtual int
402  get_num_vars() const =0;
403 
405 
409  virtual yk_var_ptr
410  get_var(const std::string& name ) =0;
412 
414 
417  virtual std::vector<yk_var_ptr>
418  get_vars() =0;
419 
421 
429  virtual void
430  prepare_solution() =0;
431 
433 
445  virtual idx_t
446  get_first_rank_domain_index(const std::string& dim ) const =0;
449 
451 
464  virtual idx_t
465  get_last_rank_domain_index(const std::string& dim ) const =0;
468 
470 
501  virtual void
502  run_solution(idx_t first_step_index ,
503  idx_t last_step_index ) =0;
504 
506 
531  virtual void
532  run_solution(idx_t step_index ) =0;
533 
535 
541  virtual void
542  end_solution() =0;
543 
545 
550  virtual yk_stats_ptr
551  get_stats() =0;
552 
554 
559  virtual bool
560  is_auto_tuner_enabled() const =0;
561 
562  /* Advanced APIs for yk_solution found below are not needed for most applications. */
563 
565 
592  virtual void
593  set_region_size(const std::string& dim,
597  idx_t size ) =0;
599 
601 
606  virtual idx_t
607  get_region_size(const std::string& dim) const =0;
611 
613 
637  virtual void
638  set_min_pad_size(const std::string& dim,
641  idx_t size ) =0;
644 
646 
649  virtual idx_t
650  get_min_pad_size(const std::string& dim) const =0;
653 
655 
666  virtual void
667  reset_auto_tuner(bool enable,
670  bool verbose = false ) =0;
673 
675 
693  virtual void
694  run_auto_tuner_now(bool verbose = true ) =0;
697 
699 
747  virtual yk_var_ptr
748  new_var(const std::string& name,
751  const std::vector<std::string>& dims ) =0;
755 
756 #ifndef SWIG
757 
764  virtual yk_var_ptr
765  new_var(const std::string& name,
768  const std::initializer_list<std::string>& dims ) =0;
772 #endif
773 
775 
822  virtual yk_var_ptr
823  new_fixed_size_var(const std::string& name,
826  const std::vector<std::string>& dims,
830  const std::vector<idx_t>& dim_sizes ) =0;
833 
834 #ifndef SWIG
835 
842  virtual yk_var_ptr
843  new_fixed_size_var(const std::string& name,
846  const std::initializer_list<std::string>& dims,
850  const std::initializer_list<idx_t>& dim_sizes ) =0;
853 #endif
854 
856 
867  virtual bool
868  set_default_numa_preferred(int numa_node) =0;
879 
881 
884  virtual int
885  get_default_numa_preferred() const =0;
886 
887 #ifndef SWIG
888  typedef std::function<void(yk_solution&)> hook_fn_t;
890 
892  typedef std::function<void(yk_solution& soln,
893  idx_t first_step_index,
894  idx_t last_step_index)> hook_fn_2idx_t;
895 
897 
905  virtual void
908 
910 
918  virtual void
921 
923 
933  virtual void
936 
938 
948  virtual void
951 #endif
952 
954 
959  virtual void
960  fuse_vars(yk_solution_ptr source) =0;
962 
964  virtual void
965  set_step_wrap(bool do_wrap) =0;
967 
969 
972  virtual bool
973  get_step_wrap() const =0;
974 
976  inline int
977  get_num_grids() const {
978  return get_num_vars();
979  }
980 
982  inline yk_var_ptr
983  get_grid(const std::string& name) {
984  return get_var(name);
985  }
986 
988  inline std::vector<yk_var_ptr>
990  return get_vars();
991  }
992 
994  inline yk_var_ptr
995  new_grid(const std::string& name,
996  const std::vector<std::string>& dims) {
997  return new_var(name, dims);
998  }
999 
1000 #ifndef SWIG
1001  inline yk_var_ptr
1003  new_grid(const std::string& name,
1004  const std::initializer_list<std::string>& dims) {
1005  return new_var(name, dims);
1006  }
1007 #endif
1008 
1010  inline yk_var_ptr
1011  new_fixed_size_grid(const std::string& name,
1012  const std::vector<std::string>& dims,
1013  const std::vector<idx_t>& dim_sizes) {
1014  return new_fixed_size_var(name, dims, dim_sizes);
1015  }
1016 
1017 #ifndef SWIG
1018  inline yk_var_ptr
1020  new_fixed_size_grid(const std::string& name,
1021  const std::initializer_list<std::string>& dims,
1022  const std::vector<idx_t>& dim_sizes) {
1023  return new_fixed_size_var(name, dims, dim_sizes);
1024  }
1025 #endif
1026 
1028  inline void
1030  fuse_vars(source);
1031  }
1032  }; // yk_solution.
1033 
1035 
1040  class yk_stats {
1041  public:
1042  virtual ~yk_stats() {}
1043 
1045 
1051  virtual idx_t
1052  get_num_elements() =0;
1053 
1055 
1059  virtual idx_t
1060  get_num_steps_done() =0;
1061 
1063 
1067  virtual idx_t
1068  get_num_writes_done() =0;
1069 
1071 
1077  virtual idx_t
1078  get_est_fp_ops_done() =0;
1079 
1081 
1085  virtual double
1086  get_elapsed_secs() =0;
1087  }; // yk_stats.
1088 
1090 } // namespace yask.
virtual void reset_auto_tuner(bool enable, bool verbose=false)=0
[Advanced] Restart or disable the auto-tuner on this rank.
+Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2021, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_kernel_api.hpp"
35 
36 namespace yask {
37 
43 
49  const int yask_numa_local = -1;
50 
52 
57  const int yask_numa_interleave = -2;
58 
60 
65  const int yask_numa_none = -9;
66 
68 
74  class yk_solution {
75  public:
76  virtual ~yk_solution() {}
77 
79 
83  virtual void
87 
89 
92  virtual const std::string&
93  get_name() const =0;
94 
96 
101  virtual std::string
102  get_target() const =0;
103 
105 
108  virtual int
109  get_element_bytes() const =0;
110 
112 
117  virtual std::string
118  get_step_dim_name() const =0;
119 
121 
127  virtual int
128  get_num_domain_dims() const =0;
129 
131 
136  virtual std::vector<std::string>
137  get_domain_dim_names() const =0;
138 
140 
148  virtual std::vector<std::string>
149  get_misc_dim_names() const =0;
150 
152 
175  virtual void
176  set_rank_domain_size(const std::string& dim,
179  idx_t size ) =0;
180 
182 
192  virtual idx_t
193  get_rank_domain_size(const std::string& dim) const =0;
196 
198 
208  virtual void
209  set_overall_domain_size(const std::string& dim,
212  idx_t size ) =0;
213 
215 
228  virtual idx_t
229  get_overall_domain_size(const std::string& dim ) const =0;
232 
234 
251  virtual void
252  set_block_size(const std::string& dim,
256  idx_t size ) =0;
258 
260 
265  virtual idx_t
266  get_block_size(const std::string& dim) const =0;
270 
272 
299  virtual void
300  set_num_ranks(const std::string& dim,
303  idx_t num ) =0;
304 
306 
309  virtual idx_t
310  get_num_ranks(const std::string& dim) const =0;
313 
315 
336  virtual void
337  set_rank_index(const std::string& dim,
340  idx_t num ) =0;
341 
343 
348  virtual idx_t
349  get_rank_index(const std::string& dim ) const =0;
352 
354 
368  virtual std::string
369  apply_command_line_options(const std::string& args ) =0;
371 
373 
380  virtual std::string
381  apply_command_line_options(int argc, char* argv[]) =0;
382 
384 
390  virtual std::string
391  apply_command_line_options(const std::vector<std::string>& args) =0;
392 
394 
401  virtual int
402  get_num_vars() const =0;
403 
405 
409  virtual yk_var_ptr
410  get_var(const std::string& name ) =0;
412 
414 
417  virtual std::vector<yk_var_ptr>
418  get_vars() =0;
419 
421 
429  virtual void
430  prepare_solution() =0;
431 
433 
445  virtual idx_t
446  get_first_rank_domain_index(const std::string& dim ) const =0;
449 
451 
464  virtual idx_t
465  get_last_rank_domain_index(const std::string& dim ) const =0;
468 
470 
501  virtual void
502  run_solution(idx_t first_step_index ,
503  idx_t last_step_index ) =0;
504 
506 
531  virtual void
532  run_solution(idx_t step_index ) =0;
533 
535 
541  virtual void
542  end_solution() =0;
543 
545 
550  virtual yk_stats_ptr
551  get_stats() =0;
552 
554 
559  virtual bool
560  is_auto_tuner_enabled() const =0;
561 
562  /* Advanced APIs for yk_solution found below are not needed for most applications. */
563 
565 
592  virtual void
593  set_region_size(const std::string& dim,
597  idx_t size ) =0;
599 
601 
606  virtual idx_t
607  get_region_size(const std::string& dim) const =0;
611 
613 
637  virtual void
638  set_min_pad_size(const std::string& dim,
641  idx_t size ) =0;
644 
646 
649  virtual idx_t
650  get_min_pad_size(const std::string& dim) const =0;
653 
655 
666  virtual void
667  reset_auto_tuner(bool enable,
670  bool verbose = false ) =0;
673 
675 
693  virtual void
694  run_auto_tuner_now(bool verbose = true ) =0;
697 
699 
747  virtual yk_var_ptr
748  new_var(const std::string& name,
751  const std::vector<std::string>& dims ) =0;
755 
756 #ifndef SWIG
757 
764  virtual yk_var_ptr
765  new_var(const std::string& name,
768  const std::initializer_list<std::string>& dims ) =0;
772 #endif
773 
775 
822  virtual yk_var_ptr
823  new_fixed_size_var(const std::string& name,
826  const std::vector<std::string>& dims,
830  const std::vector<idx_t>& dim_sizes ) =0;
833 
834 #ifndef SWIG
835 
842  virtual yk_var_ptr
843  new_fixed_size_var(const std::string& name,
846  const std::initializer_list<std::string>& dims,
850  const std::initializer_list<idx_t>& dim_sizes ) =0;
853 #endif
854 
856 
867  virtual bool
868  set_default_numa_preferred(int numa_node) =0;
879 
881 
884  virtual int
885  get_default_numa_preferred() const =0;
886 
887 #ifndef SWIG
888  typedef std::function<void(yk_solution&)> hook_fn_t;
890 
892  typedef std::function<void(yk_solution& soln,
893  idx_t first_step_index,
894  idx_t last_step_index)> hook_fn_2idx_t;
895 
897 
905  virtual void
908 
910 
918  virtual void
921 
923 
933  virtual void
936 
938 
948  virtual void
951 #endif
952 
954 
959  virtual void
960  fuse_vars(yk_solution_ptr source) =0;
962 
964  virtual void
965  set_step_wrap(bool do_wrap) =0;
967 
969 
972  virtual bool
973  get_step_wrap() const =0;
974 
976  inline int
977  get_num_grids() const {
978  return get_num_vars();
979  }
980 
982  inline yk_var_ptr
983  get_grid(const std::string& name) {
984  return get_var(name);
985  }
986 
988  inline std::vector<yk_var_ptr>
990  return get_vars();
991  }
992 
994  inline yk_var_ptr
995  new_grid(const std::string& name,
996  const std::vector<std::string>& dims) {
997  return new_var(name, dims);
998  }
999 
1000 #ifndef SWIG
1001  inline yk_var_ptr
1003  new_grid(const std::string& name,
1004  const std::initializer_list<std::string>& dims) {
1005  return new_var(name, dims);
1006  }
1007 #endif
1008 
1010  inline yk_var_ptr
1011  new_fixed_size_grid(const std::string& name,
1012  const std::vector<std::string>& dims,
1013  const std::vector<idx_t>& dim_sizes) {
1014  return new_fixed_size_var(name, dims, dim_sizes);
1015  }
1016 
1017 #ifndef SWIG
1018  inline yk_var_ptr
1020  new_fixed_size_grid(const std::string& name,
1021  const std::initializer_list<std::string>& dims,
1022  const std::vector<idx_t>& dim_sizes) {
1023  return new_fixed_size_var(name, dims, dim_sizes);
1024  }
1025 #endif
1026 
1028  inline void
1030  fuse_vars(source);
1031  }
1032  }; // yk_solution.
1033 
1035 
1040  class yk_stats {
1041  public:
1042  virtual ~yk_stats() {}
1043 
1045 
1051  virtual idx_t
1052  get_num_elements() =0;
1053 
1055 
1059  virtual idx_t
1060  get_num_steps_done() =0;
1061 
1063 
1067  virtual idx_t
1068  get_num_writes_done() =0;
1069 
1071 
1077  virtual idx_t
1078  get_est_fp_ops_done() =0;
1079 
1081 
1085  virtual double
1086  get_elapsed_secs() =0;
1087  }; // yk_stats.
1088 
1090 } // namespace yask.
virtual void reset_auto_tuner(bool enable, bool verbose=false)=0
[Advanced] Restart or disable the auto-tuner on this rank.
virtual idx_t get_num_writes_done()=0
Get the number of elements written across all steps.
void fuse_grids(yk_solution_ptr source)
[Deprecated] Use fuse_vars().
Definition: yk_solution_api.hpp:1029
virtual yk_var_ptr new_fixed_size_var(const std::string &name, const std::vector< std::string > &dims, const std::vector< idx_t > &dim_sizes)=0
[Advanced] Add a new var to the solution with a specified size.
diff --git a/docs/api/html/yk__var__api_8hpp_source.html b/docs/api/html/yk__var__api_8hpp_source.html index b56a6b0a..49b43f3f 100644 --- a/docs/api/html/yk__var__api_8hpp_source.html +++ b/docs/api/html/yk__var__api_8hpp_source.html @@ -70,7 +70,7 @@
yk_var_api.hpp
-Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2020, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_kernel_api.hpp"
35 
36 namespace yask {
37 
43 
185  class yk_var {
186  public:
187  virtual ~yk_var() {}
188 
190 
196  virtual const std::string& get_name() const =0;
197 
199 
204  virtual int get_num_dims() const =0;
205 
207 
211  virtual std::vector<std::string>
212  get_dim_names() const =0;
213 
215 
219  virtual bool
220  is_dim_used(const std::string& dim) const =0;
221 
223 
227  virtual bool is_fixed_size() const =0;
228 
230 
242  virtual idx_t
243  get_first_local_index(const std::string& dim ) const =0;
246 
248 
260  virtual idx_t
261  get_last_local_index(const std::string& dim ) const =0;
264 
266 
273  virtual idx_t
274  get_alloc_size(const std::string& dim ) const =0;
277 
279 
287  virtual idx_t
288  get_first_valid_step_index() const =0;
289 
291 
299  virtual idx_t
300  get_last_valid_step_index() const =0;
301 
303 
308  virtual idx_t
309  get_rank_domain_size(const std::string& dim) const =0;
312 
314 
320  virtual idx_t
321  get_first_rank_domain_index(const std::string& dim ) const =0;
324 
326 
333  virtual idx_t
334  get_last_rank_domain_index(const std::string& dim ) const =0;
337 
339 
343  virtual idx_t
344  get_left_halo_size(const std::string& dim ) const =0;
348 
350 
354  virtual idx_t
355  get_right_halo_size(const std::string& dim ) const =0;
359 
361 
368  virtual idx_t
369  get_first_rank_halo_index(const std::string& dim ) const =0;
372 
374 
381  virtual idx_t
382  get_last_rank_halo_index(const std::string& dim ) const =0;
385 
387 
395  virtual idx_t
396  get_left_pad_size(const std::string& dim ) const =0;
400 
402 
410  virtual idx_t
411  get_right_pad_size(const std::string& dim ) const =0;
415 
417 
422  virtual idx_t
423  get_left_extra_pad_size(const std::string& dim ) const =0;
427 
429 
434  virtual idx_t
435  get_right_extra_pad_size(const std::string& dim ) const =0;
439 
441 
445  virtual idx_t
446  get_first_misc_index(const std::string& dim ) const =0;
449 
451 
455  virtual idx_t
456  get_last_misc_index(const std::string& dim ) const =0;
459 
461 
468  virtual bool
469  are_indices_local(const std::vector<idx_t>& indices ) const =0;
471 
472 #ifndef SWIG
473 
477  virtual bool
478  are_indices_local(const std::initializer_list<idx_t>& indices ) const =0;
480 #endif
481 
483 
491  virtual double
492  get_element(const std::vector<idx_t>& indices ) const =0;
494 
495 #ifndef SWIG
496 
501  virtual double
502  get_element(const std::initializer_list<idx_t>& indices ) const =0;
504 #endif
505 
507 
526  virtual idx_t
527  set_element(double val ,
528  const std::vector<idx_t>& indices,
530  bool strict_indices = true ) =0;
534 
535 #ifndef SWIG
536 
541  virtual idx_t
542  set_element(double val ,
543  const std::initializer_list<idx_t>& indices,
545  bool strict_indices = true ) =0;
549 #endif
550 
552 
569  virtual idx_t
570  get_elements_in_slice(void* buffer_ptr,
572  const std::vector<idx_t>& first_indices,
574  const std::vector<idx_t>& last_indices ) const =0;
576 
578 
593  virtual idx_t
594  add_to_element(double val ,
595  const std::vector<idx_t>& indices,
597  bool strict_indices = true ) =0;
601 
602 #ifndef SWIG
603 
608  virtual idx_t
609  add_to_element(double val ,
610  const std::initializer_list<idx_t>& indices,
612  bool strict_indices = true ) =0;
616 #endif
617 
619 
627  virtual void
628  set_all_elements_same(double val ) =0;
629 
631 
644  virtual idx_t
645  set_elements_in_slice_same(double val ,
646  const std::vector<idx_t>& first_indices,
648  const std::vector<idx_t>& last_indices,
650  bool strict_indices = true ) =0;
654 
656 
675  virtual idx_t
676  set_elements_in_slice(const void* buffer_ptr,
678  const std::vector<idx_t>& first_indices,
680  const std::vector<idx_t>& last_indices ) =0;
682 
683 #ifdef COPY_SLICE_IMPLEMENTED
684 
698  virtual idx_t
699  set_elements_in_slice(const yk_var_ptr source,
701  const std::vector<idx_t>& first_source_indices,
704  const std::vector<idx_t>& first_target_indices,
707  const std::vector<idx_t>& last_target_indices ) =0;
710 #endif
711 
713 
717  virtual std::string
718  format_indices(const std::vector<idx_t>& indices ) const =0;
720 
721 #ifndef SWIG
722 
727  virtual std::string
728  format_indices(const std::initializer_list<idx_t>& indices ) const =0;
730 #endif
731 
732  /* Advanced APIs for yk_var found below are not needed for most applications. */
733 
735 
752  virtual int
753  get_halo_exchange_l1_norm() const =0;
754 
756 
759  virtual void
760  set_halo_exchange_l1_norm(int norm) =0;
763 
765 
768  virtual bool
769  is_dynamic_step_alloc() const =0;
770 
772 
779  virtual bool
780  set_numa_preferred(int numa_node) =0;
783 
785 
788  virtual int
789  get_numa_preferred() const =0;
790 
792 
802  virtual void
803  set_left_min_pad_size(const std::string& dim,
807  idx_t size ) =0;
810 
812 
822  virtual void
823  set_right_min_pad_size(const std::string& dim,
827  idx_t size ) =0;
830 
832 
835  virtual void
836  set_min_pad_size(const std::string& dim,
840  idx_t size ) =0;
843 
845 
854  virtual void
855  set_left_halo_size(const std::string& dim,
859  idx_t size ) =0;
861 
863 
872  virtual void
873  set_right_halo_size(const std::string& dim,
877  idx_t size ) =0;
879 
881 
884  virtual void
885  set_halo_size(const std::string& dim,
889  idx_t size ) =0;
891 
892 
894 
919  virtual void
920  set_alloc_size(const std::string& dim,
924  idx_t size ) =0;
925 
927 
933  virtual void
934  set_first_misc_index(const std::string& dim,
937  idx_t idx ) =0;
939 
941 
945  virtual idx_t
946  get_first_rank_alloc_index(const std::string& dim ) const =0;
950 
952 
956  virtual idx_t
957  get_last_rank_alloc_index(const std::string& dim ) const =0;
961 
963 
967  virtual bool
968  is_storage_allocated() const =0;
969 
971 
975  virtual idx_t
976  get_num_storage_bytes() const =0;
977 
979 
982  virtual idx_t
983  get_num_storage_elements() const =0;
984 
986 
992  virtual void
993  alloc_storage() =0;
994 
996 
1000  virtual void
1001  release_storage() =0;
1002 
1004 
1020  virtual bool
1021  is_storage_layout_identical(const yk_var_ptr other) const =0;
1022 
1024 
1050  virtual void
1051  fuse_vars(yk_var_ptr source) =0;
1053 
1055 
1091  virtual void* get_raw_storage_buffer() =0;
1092 
1093  /* Deprecated APIs for yk_var found below should be avoided.
1094  Use the more explicit form found in the documentation. */
1095 
1097  inline idx_t
1098  get_halo_size(const std::string& dim) const {
1099  return get_left_halo_size(dim);
1100  }
1102  inline idx_t
1103  get_pad_size(const std::string& dim) const {
1104  return get_left_pad_size(dim);
1105  }
1107  inline idx_t
1108  get_extra_pad_size(const std::string& dim) const {
1109  return get_left_extra_pad_size(dim);
1110  }
1111 
1113  inline bool
1114  is_element_allocated(const std::vector<idx_t>& indices ) const {
1116  return are_indices_local(indices);
1117  }
1118 
1119 #ifndef SWIG
1120  inline bool
1122  is_element_allocated(const std::initializer_list<idx_t>& indices ) const {
1124  return are_indices_local(indices);
1125  }
1126 #endif
1127 
1129  inline void
1131  fuse_vars(source);
1132  }
1133 
1134  }; // yk_var.
1135 
1137  typedef yk_var yk_grid;
1138 
1140 } // namespace yask.
virtual idx_t get_alloc_size(const std::string &dim) const =0
Get the number of elements allocated in the specified dimension.
+Go to the documentation of this file.
1 /*****************************************************************************
2 
3 YASK: Yet Another Stencil Kit
4 Copyright (c) 2014-2021, Intel Corporation
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to
8 deal in the Software without restriction, including without limitation the
9 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 sell copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 * The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 IN THE SOFTWARE.
23 
24 *****************************************************************************/
25 
27 
28 // This file uses Doxygen 1.8 markup for API documentation-generation.
29 // See http://www.stack.nl/~dimitri/doxygen.
32 #pragma once
33 
34 #include "yask_kernel_api.hpp"
35 
36 namespace yask {
37 
43 
185  class yk_var {
186  public:
187  virtual ~yk_var() {}
188 
190 
196  virtual const std::string& get_name() const =0;
197 
199 
204  virtual int get_num_dims() const =0;
205 
207 
211  virtual std::vector<std::string>
212  get_dim_names() const =0;
213 
215 
219  virtual bool
220  is_dim_used(const std::string& dim) const =0;
221 
223 
227  virtual bool is_fixed_size() const =0;
228 
230 
242  virtual idx_t
243  get_first_local_index(const std::string& dim ) const =0;
246 
248 
260  virtual idx_t
261  get_last_local_index(const std::string& dim ) const =0;
264 
266 
273  virtual idx_t
274  get_alloc_size(const std::string& dim ) const =0;
277 
279 
287  virtual idx_t
288  get_first_valid_step_index() const =0;
289 
291 
299  virtual idx_t
300  get_last_valid_step_index() const =0;
301 
303 
308  virtual idx_t
309  get_rank_domain_size(const std::string& dim) const =0;
312 
314 
320  virtual idx_t
321  get_first_rank_domain_index(const std::string& dim ) const =0;
324 
326 
333  virtual idx_t
334  get_last_rank_domain_index(const std::string& dim ) const =0;
337 
339 
343  virtual idx_t
344  get_left_halo_size(const std::string& dim ) const =0;
348 
350 
354  virtual idx_t
355  get_right_halo_size(const std::string& dim ) const =0;
359 
361 
368  virtual idx_t
369  get_first_rank_halo_index(const std::string& dim ) const =0;
372 
374 
381  virtual idx_t
382  get_last_rank_halo_index(const std::string& dim ) const =0;
385 
387 
395  virtual idx_t
396  get_left_pad_size(const std::string& dim ) const =0;
400 
402 
410  virtual idx_t
411  get_right_pad_size(const std::string& dim ) const =0;
415 
417 
422  virtual idx_t
423  get_left_extra_pad_size(const std::string& dim ) const =0;
427 
429 
434  virtual idx_t
435  get_right_extra_pad_size(const std::string& dim ) const =0;
439 
441 
445  virtual idx_t
446  get_first_misc_index(const std::string& dim ) const =0;
449 
451 
455  virtual idx_t
456  get_last_misc_index(const std::string& dim ) const =0;
459 
461 
468  virtual bool
469  are_indices_local(const std::vector<idx_t>& indices ) const =0;
471 
472 #ifndef SWIG
473 
477  virtual bool
478  are_indices_local(const std::initializer_list<idx_t>& indices ) const =0;
480 #endif
481 
483 
491  virtual double
492  get_element(const std::vector<idx_t>& indices ) const =0;
494 
495 #ifndef SWIG
496 
501  virtual double
502  get_element(const std::initializer_list<idx_t>& indices ) const =0;
504 #endif
505 
507 
526  virtual idx_t
527  set_element(double val ,
528  const std::vector<idx_t>& indices,
530  bool strict_indices = true ) =0;
534 
535 #ifndef SWIG
536 
541  virtual idx_t
542  set_element(double val ,
543  const std::initializer_list<idx_t>& indices,
545  bool strict_indices = true ) =0;
549 #endif
550 
552 
569  virtual idx_t
570  get_elements_in_slice(void* buffer_ptr,
572  const std::vector<idx_t>& first_indices,
574  const std::vector<idx_t>& last_indices ) const =0;
576 
578 
593  virtual idx_t
594  add_to_element(double val ,
595  const std::vector<idx_t>& indices,
597  bool strict_indices = true ) =0;
601 
602 #ifndef SWIG
603 
608  virtual idx_t
609  add_to_element(double val ,
610  const std::initializer_list<idx_t>& indices,
612  bool strict_indices = true ) =0;
616 #endif
617 
619 
627  virtual void
628  set_all_elements_same(double val ) =0;
629 
631 
644  virtual idx_t
645  set_elements_in_slice_same(double val ,
646  const std::vector<idx_t>& first_indices,
648  const std::vector<idx_t>& last_indices,
650  bool strict_indices = true ) =0;
654 
656 
675  virtual idx_t
676  set_elements_in_slice(const void* buffer_ptr,
678  const std::vector<idx_t>& first_indices,
680  const std::vector<idx_t>& last_indices ) =0;
682 
683 #ifdef COPY_SLICE_IMPLEMENTED
684 
698  virtual idx_t
699  set_elements_in_slice(const yk_var_ptr source,
701  const std::vector<idx_t>& first_source_indices,
704  const std::vector<idx_t>& first_target_indices,
707  const std::vector<idx_t>& last_target_indices ) =0;
710 #endif
711 
713 
717  virtual std::string
718  format_indices(const std::vector<idx_t>& indices ) const =0;
720 
721 #ifndef SWIG
722 
727  virtual std::string
728  format_indices(const std::initializer_list<idx_t>& indices ) const =0;
730 #endif
731 
732  /* Advanced APIs for yk_var found below are not needed for most applications. */
733 
735 
752  virtual int
753  get_halo_exchange_l1_norm() const =0;
754 
756 
759  virtual void
760  set_halo_exchange_l1_norm(int norm) =0;
763 
765 
768  virtual bool
769  is_dynamic_step_alloc() const =0;
770 
772 
779  virtual bool
780  set_numa_preferred(int numa_node) =0;
783 
785 
788  virtual int
789  get_numa_preferred() const =0;
790 
792 
802  virtual void
803  set_left_min_pad_size(const std::string& dim,
807  idx_t size ) =0;
810 
812 
822  virtual void
823  set_right_min_pad_size(const std::string& dim,
827  idx_t size ) =0;
830 
832 
835  virtual void
836  set_min_pad_size(const std::string& dim,
840  idx_t size ) =0;
843 
845 
854  virtual void
855  set_left_halo_size(const std::string& dim,
859  idx_t size ) =0;
861 
863 
872  virtual void
873  set_right_halo_size(const std::string& dim,
877  idx_t size ) =0;
879 
881 
884  virtual void
885  set_halo_size(const std::string& dim,
889  idx_t size ) =0;
891 
892 
894 
919  virtual void
920  set_alloc_size(const std::string& dim,
924  idx_t size ) =0;
925 
927 
933  virtual void
934  set_first_misc_index(const std::string& dim,
937  idx_t idx ) =0;
939 
941 
945  virtual idx_t
946  get_first_rank_alloc_index(const std::string& dim ) const =0;
950 
952 
956  virtual idx_t
957  get_last_rank_alloc_index(const std::string& dim ) const =0;
961 
963 
967  virtual bool
968  is_storage_allocated() const =0;
969 
971 
975  virtual idx_t
976  get_num_storage_bytes() const =0;
977 
979 
982  virtual idx_t
983  get_num_storage_elements() const =0;
984 
986 
992  virtual void
993  alloc_storage() =0;
994 
996 
1000  virtual void
1001  release_storage() =0;
1002 
1004 
1020  virtual bool
1021  is_storage_layout_identical(const yk_var_ptr other) const =0;
1022 
1024 
1050  virtual void
1051  fuse_vars(yk_var_ptr source) =0;
1053 
1055 
1091  virtual void* get_raw_storage_buffer() =0;
1092 
1093  /* Deprecated APIs for yk_var found below should be avoided.
1094  Use the more explicit form found in the documentation. */
1095 
1097  inline idx_t
1098  get_halo_size(const std::string& dim) const {
1099  return get_left_halo_size(dim);
1100  }
1102  inline idx_t
1103  get_pad_size(const std::string& dim) const {
1104  return get_left_pad_size(dim);
1105  }
1107  inline idx_t
1108  get_extra_pad_size(const std::string& dim) const {
1109  return get_left_extra_pad_size(dim);
1110  }
1111 
1113  inline bool
1114  is_element_allocated(const std::vector<idx_t>& indices ) const {
1116  return are_indices_local(indices);
1117  }
1118 
1119 #ifndef SWIG
1120  inline bool
1122  is_element_allocated(const std::initializer_list<idx_t>& indices ) const {
1124  return are_indices_local(indices);
1125  }
1126 #endif
1127 
1129  inline void
1131  fuse_vars(source);
1132  }
1133 
1134  }; // yk_var.
1135 
1137  typedef yk_var yk_grid;
1138 
1140 } // namespace yask.
virtual idx_t get_alloc_size(const std::string &dim) const =0
Get the number of elements allocated in the specified dimension.
virtual idx_t get_first_valid_step_index() const =0
Get the first valid index in the step dimension.
virtual idx_t get_left_pad_size(const std::string &dim) const =0
Get the actual left padding in the specified dimension.
virtual bool is_dynamic_step_alloc() const =0
[Advanced] Get whether the allocation of the step dimension of this var can be modified at run-time.
diff --git a/include/aux/Soln.hpp b/include/aux/Soln.hpp index ed10386b..26318ac1 100644 --- a/include/aux/Soln.hpp +++ b/include/aux/Soln.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/include/aux/yc_node_api.hpp b/include/aux/yc_node_api.hpp index 3ced0119..d82b050b 100644 --- a/include/aux/yc_node_api.hpp +++ b/include/aux/yc_node_api.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/include/aux/yc_solution_api.hpp b/include/aux/yc_solution_api.hpp index 456c62f8..d4f6a78f 100644 --- a/include/aux/yc_solution_api.hpp +++ b/include/aux/yc_solution_api.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/include/aux/yk_solution_api.hpp b/include/aux/yk_solution_api.hpp index b69f276e..7de32e95 100644 --- a/include/aux/yk_solution_api.hpp +++ b/include/aux/yk_solution_api.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/include/aux/yk_var_api.hpp b/include/aux/yk_var_api.hpp index a2f271c4..109de934 100644 --- a/include/aux/yk_var_api.hpp +++ b/include/aux/yk_var_api.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/include/yask_common_api.hpp b/include/yask_common_api.hpp index d55b784f..8dbbae8a 100644 --- a/include/yask_common_api.hpp +++ b/include/yask_common_api.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/include/yask_compiler_api.hpp b/include/yask_compiler_api.hpp index 426643dd..2e0ad70b 100644 --- a/include/yask_compiler_api.hpp +++ b/include/yask_compiler_api.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/include/yask_kernel_api.hpp b/include/yask_kernel_api.hpp index bd1da286..731464b1 100644 --- a/include/yask_kernel_api.hpp +++ b/include/yask_kernel_api.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/combo.cpp b/src/common/combo.cpp index 241d8614..f43c1827 100644 --- a/src/common/combo.cpp +++ b/src/common/combo.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/combo.hpp b/src/common/combo.hpp index 0b7d11e5..11bad3cd 100644 --- a/src/common/combo.hpp +++ b/src/common/combo.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/common.mk b/src/common/common.mk index c1baeb7f..ec244469 100644 --- a/src/common/common.mk +++ b/src/common/common.mk @@ -1,6 +1,6 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/common/common_utils.cpp b/src/common/common_utils.cpp index 51922ed0..90217c15 100644 --- a/src/common/common_utils.cpp +++ b/src/common/common_utils.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -43,7 +43,7 @@ namespace yask { // for numbers above 9 (at least up to 99). // Format: "major.minor.patch". - const string version = "3.05.06"; + const string version = "3.05.07"; string yask_get_version_string() { return version; diff --git a/src/common/common_utils.hpp b/src/common/common_utils.hpp index abc8271f..4272e48c 100644 --- a/src/common/common_utils.hpp +++ b/src/common/common_utils.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/fd_coeff2.cpp b/src/common/fd_coeff2.cpp index 4d8c9541..eba4c16c 100644 --- a/src/common/fd_coeff2.cpp +++ b/src/common/fd_coeff2.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/idiv.hpp b/src/common/idiv.hpp index 75b32e5e..b8a8ad07 100644 --- a/src/common/idiv.hpp +++ b/src/common/idiv.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/output.cpp b/src/common/output.cpp index 2fbae142..876ff9a1 100644 --- a/src/common/output.cpp +++ b/src/common/output.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/swig/yask_common_api.i b/src/common/swig/yask_common_api.i index 317e4fef..f679efd8 100644 --- a/src/common/swig/yask_common_api.i +++ b/src/common/swig/yask_common_api.i @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/tests/combo_test.cpp b/src/common/tests/combo_test.cpp index 4c139a34..623400cb 100644 --- a/src/common/tests/combo_test.cpp +++ b/src/common/tests/combo_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/tests/tuple_test.cpp b/src/common/tests/tuple_test.cpp index 7329ac42..c753482d 100644 --- a/src/common/tests/tuple_test.cpp +++ b/src/common/tests/tuple_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/tuple.cpp b/src/common/tuple.cpp index 70dcba97..5d7a54ed 100644 --- a/src/common/tuple.cpp +++ b/src/common/tuple.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/tuple.hpp b/src/common/tuple.hpp index 6b9aeff5..2a987048 100644 --- a/src/common/tuple.hpp +++ b/src/common/tuple.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/common/yask_assert.hpp b/src/common/yask_assert.hpp index 71dfea2d..1368b9e8 100644 --- a/src/common/yask_assert.hpp +++ b/src/common/yask_assert.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/Makefile b/src/compiler/Makefile index 21c82f07..2921d17c 100644 --- a/src/compiler/Makefile +++ b/src/compiler/Makefile @@ -1,6 +1,6 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/compiler_main.cpp b/src/compiler/compiler_main.cpp index 6a5c2670..fbbbb982 100644 --- a/src/compiler/compiler_main.cpp +++ b/src/compiler/compiler_main.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -373,7 +373,7 @@ int main(int argc, const char* argv[]) { cout << "YASK -- Yet Another Stencil Kit\n" "YASK Stencil Compiler Utility\n" - "Copyright (c) 2014-2020, Intel Corporation.\n" + "Copyright (c) 2014-2021, Intel Corporation.\n" "Version: " << yask_get_version_string() << endl; try { diff --git a/src/compiler/lib/Cpp.cpp b/src/compiler/lib/Cpp.cpp index 7e4b64c1..0ed5d39e 100644 --- a/src/compiler/lib/Cpp.cpp +++ b/src/compiler/lib/Cpp.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Cpp.hpp b/src/compiler/lib/Cpp.hpp index db8cf39a..af0f399a 100644 --- a/src/compiler/lib/Cpp.hpp +++ b/src/compiler/lib/Cpp.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/CppIntrin.cpp b/src/compiler/lib/CppIntrin.cpp index d038f6f0..9c8f7805 100644 --- a/src/compiler/lib/CppIntrin.cpp +++ b/src/compiler/lib/CppIntrin.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/CppIntrin.hpp b/src/compiler/lib/CppIntrin.hpp index 5ab43e15..84985bdc 100644 --- a/src/compiler/lib/CppIntrin.hpp +++ b/src/compiler/lib/CppIntrin.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Eqs.cpp b/src/compiler/lib/Eqs.cpp index 593750cc..bae7661f 100644 --- a/src/compiler/lib/Eqs.cpp +++ b/src/compiler/lib/Eqs.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Eqs.hpp b/src/compiler/lib/Eqs.hpp index bd9efde7..00d02671 100644 --- a/src/compiler/lib/Eqs.hpp +++ b/src/compiler/lib/Eqs.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Expr.cpp b/src/compiler/lib/Expr.cpp index c791ea82..0aa3ac50 100644 --- a/src/compiler/lib/Expr.cpp +++ b/src/compiler/lib/Expr.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Expr.hpp b/src/compiler/lib/Expr.hpp index c5f5f638..b83a56e1 100644 --- a/src/compiler/lib/Expr.hpp +++ b/src/compiler/lib/Expr.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/ExprUtils.cpp b/src/compiler/lib/ExprUtils.cpp index bc1d4321..27deb23b 100644 --- a/src/compiler/lib/ExprUtils.cpp +++ b/src/compiler/lib/ExprUtils.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/ExprUtils.hpp b/src/compiler/lib/ExprUtils.hpp index 1839679d..c8d88212 100644 --- a/src/compiler/lib/ExprUtils.hpp +++ b/src/compiler/lib/ExprUtils.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Parse.hpp b/src/compiler/lib/Parse.hpp index 2c79d4ac..62445ec7 100644 --- a/src/compiler/lib/Parse.hpp +++ b/src/compiler/lib/Parse.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Print.cpp b/src/compiler/lib/Print.cpp index efc7494a..1a67fa37 100644 --- a/src/compiler/lib/Print.cpp +++ b/src/compiler/lib/Print.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Print.hpp b/src/compiler/lib/Print.hpp index ccfc0ee6..5cfc4e82 100644 --- a/src/compiler/lib/Print.hpp +++ b/src/compiler/lib/Print.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Settings.cpp b/src/compiler/lib/Settings.cpp index 94e95919..db4358ce 100644 --- a/src/compiler/lib/Settings.cpp +++ b/src/compiler/lib/Settings.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Settings.hpp b/src/compiler/lib/Settings.hpp index 16fd805c..442ff392 100644 --- a/src/compiler/lib/Settings.hpp +++ b/src/compiler/lib/Settings.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Solution.cpp b/src/compiler/lib/Solution.cpp index 77e37845..6dc77198 100644 --- a/src/compiler/lib/Solution.cpp +++ b/src/compiler/lib/Solution.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Solution.hpp b/src/compiler/lib/Solution.hpp index 6e753586..2ba920dd 100644 --- a/src/compiler/lib/Solution.hpp +++ b/src/compiler/lib/Solution.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Var.cpp b/src/compiler/lib/Var.cpp index a66f0f16..2adf0375 100644 --- a/src/compiler/lib/Var.cpp +++ b/src/compiler/lib/Var.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Var.hpp b/src/compiler/lib/Var.hpp index f07ed5f8..e483074b 100644 --- a/src/compiler/lib/Var.hpp +++ b/src/compiler/lib/Var.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Vec.cpp b/src/compiler/lib/Vec.cpp index e8558c36..c128c511 100644 --- a/src/compiler/lib/Vec.cpp +++ b/src/compiler/lib/Vec.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Vec.hpp b/src/compiler/lib/Vec.hpp index c041d810..b3a43aee 100644 --- a/src/compiler/lib/Vec.hpp +++ b/src/compiler/lib/Vec.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/Visitor.hpp b/src/compiler/lib/Visitor.hpp index 15e916e3..0cd53bd8 100644 --- a/src/compiler/lib/Visitor.hpp +++ b/src/compiler/lib/Visitor.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/lib/YaskKernel.cpp b/src/compiler/lib/YaskKernel.cpp index 8f7f2545..801cbb9f 100644 --- a/src/compiler/lib/YaskKernel.cpp +++ b/src/compiler/lib/YaskKernel.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/swig/yask_compiler_api.i b/src/compiler/swig/yask_compiler_api.i index fc535e48..c8e45fe6 100644 --- a/src/compiler/swig/yask_compiler_api.i +++ b/src/compiler/swig/yask_compiler_api.i @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/tests/yask_compiler_api_exception_test.cpp b/src/compiler/tests/yask_compiler_api_exception_test.cpp index c093ea03..8148ac2f 100644 --- a/src/compiler/tests/yask_compiler_api_exception_test.cpp +++ b/src/compiler/tests/yask_compiler_api_exception_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/tests/yask_compiler_api_exception_test.py b/src/compiler/tests/yask_compiler_api_exception_test.py index 81380909..556ba1a5 100755 --- a/src/compiler/tests/yask_compiler_api_exception_test.py +++ b/src/compiler/tests/yask_compiler_api_exception_test.py @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/tests/yask_compiler_api_test.cpp b/src/compiler/tests/yask_compiler_api_test.cpp index 3a28af15..90d48ad0 100644 --- a/src/compiler/tests/yask_compiler_api_test.cpp +++ b/src/compiler/tests/yask_compiler_api_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/compiler/tests/yask_compiler_api_test.py b/src/compiler/tests/yask_compiler_api_test.py index 6fc8752f..3d6b159e 100755 --- a/src/compiler/tests/yask_compiler_api_test.py +++ b/src/compiler/tests/yask_compiler_api_test.py @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/contrib/coefficients/fd_coeff.cpp b/src/contrib/coefficients/fd_coeff.cpp index 249630e8..432510dd 100644 --- a/src/contrib/coefficients/fd_coeff.cpp +++ b/src/contrib/coefficients/fd_coeff.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/contrib/coefficients/fd_coeff.hpp b/src/contrib/coefficients/fd_coeff.hpp index 34ac00d3..b52fac2b 100644 --- a/src/contrib/coefficients/fd_coeff.hpp +++ b/src/contrib/coefficients/fd_coeff.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/contrib/coefficients/fd_coeff_test.cpp b/src/contrib/coefficients/fd_coeff_test.cpp index a2fecf18..8ec7cd8e 100644 --- a/src/contrib/coefficients/fd_coeff_test.cpp +++ b/src/contrib/coefficients/fd_coeff_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/Makefile b/src/kernel/Makefile index f7db81ab..eca83b56 100644 --- a/src/kernel/Makefile +++ b/src/kernel/Makefile @@ -1,6 +1,6 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/alloc.cpp b/src/kernel/lib/alloc.cpp index 3334a56a..2af63442 100644 --- a/src/kernel/lib/alloc.cpp +++ b/src/kernel/lib/alloc.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/auto_tuner.cpp b/src/kernel/lib/auto_tuner.cpp index 21031f47..703390f4 100644 --- a/src/kernel/lib/auto_tuner.cpp +++ b/src/kernel/lib/auto_tuner.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/auto_tuner.hpp b/src/kernel/lib/auto_tuner.hpp index 8949eb58..f33b3664 100644 --- a/src/kernel/lib/auto_tuner.hpp +++ b/src/kernel/lib/auto_tuner.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/cache_model.hpp b/src/kernel/lib/cache_model.hpp index 903adbe1..f6cc0031 100644 --- a/src/kernel/lib/cache_model.hpp +++ b/src/kernel/lib/cache_model.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/context.cpp b/src/kernel/lib/context.cpp index 030ee6a0..4a9301b4 100644 --- a/src/kernel/lib/context.cpp +++ b/src/kernel/lib/context.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/context.hpp b/src/kernel/lib/context.hpp index cc4e80e8..b48e776c 100644 --- a/src/kernel/lib/context.hpp +++ b/src/kernel/lib/context.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/factory.cpp b/src/kernel/lib/factory.cpp index 8b7cf6e3..d2549757 100644 --- a/src/kernel/lib/factory.cpp +++ b/src/kernel/lib/factory.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/generic_var.cpp b/src/kernel/lib/generic_var.cpp index 286ec3e0..a9a53f89 100644 --- a/src/kernel/lib/generic_var.cpp +++ b/src/kernel/lib/generic_var.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/generic_var.hpp b/src/kernel/lib/generic_var.hpp index 9f59ebcc..0540e736 100644 --- a/src/kernel/lib/generic_var.hpp +++ b/src/kernel/lib/generic_var.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/indices.hpp b/src/kernel/lib/indices.hpp index be4ce05a..40b14f3f 100644 --- a/src/kernel/lib/indices.hpp +++ b/src/kernel/lib/indices.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/new_var.cpp b/src/kernel/lib/new_var.cpp index 79cc785c..501fdfa3 100644 --- a/src/kernel/lib/new_var.cpp +++ b/src/kernel/lib/new_var.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/realv.hpp b/src/kernel/lib/realv.hpp index adf0d42d..7bba0582 100644 --- a/src/kernel/lib/realv.hpp +++ b/src/kernel/lib/realv.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/settings.cpp b/src/kernel/lib/settings.cpp index f1acd586..c7283231 100644 --- a/src/kernel/lib/settings.cpp +++ b/src/kernel/lib/settings.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/settings.hpp b/src/kernel/lib/settings.hpp index 068af264..e4741c1f 100644 --- a/src/kernel/lib/settings.hpp +++ b/src/kernel/lib/settings.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/setup.cpp b/src/kernel/lib/setup.cpp index 8debb824..f7638575 100644 --- a/src/kernel/lib/setup.cpp +++ b/src/kernel/lib/setup.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/soln_apis.cpp b/src/kernel/lib/soln_apis.cpp index cfa10be5..409c52f0 100644 --- a/src/kernel/lib/soln_apis.cpp +++ b/src/kernel/lib/soln_apis.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/stencil_calc.cpp b/src/kernel/lib/stencil_calc.cpp index 252f550e..72329680 100644 --- a/src/kernel/lib/stencil_calc.cpp +++ b/src/kernel/lib/stencil_calc.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/stencil_calc.hpp b/src/kernel/lib/stencil_calc.hpp index 55089c32..20975e85 100644 --- a/src/kernel/lib/stencil_calc.hpp +++ b/src/kernel/lib/stencil_calc.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/utils.cpp b/src/kernel/lib/utils.cpp index 24290bbf..1a41dabf 100644 --- a/src/kernel/lib/utils.cpp +++ b/src/kernel/lib/utils.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/utils.hpp b/src/kernel/lib/utils.hpp index 2fe070d9..c2301d18 100644 --- a/src/kernel/lib/utils.hpp +++ b/src/kernel/lib/utils.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/yask.hpp b/src/kernel/lib/yask.hpp index f9b056fd..4a3642e5 100644 --- a/src/kernel/lib/yask.hpp +++ b/src/kernel/lib/yask.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/yask_stencil.hpp b/src/kernel/lib/yask_stencil.hpp index 02fa83d3..e2863569 100644 --- a/src/kernel/lib/yask_stencil.hpp +++ b/src/kernel/lib/yask_stencil.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/yk_var.cpp b/src/kernel/lib/yk_var.cpp index 92409a87..17857d3a 100644 --- a/src/kernel/lib/yk_var.cpp +++ b/src/kernel/lib/yk_var.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/yk_var.hpp b/src/kernel/lib/yk_var.hpp index 494d0e3f..09b0f130 100644 --- a/src/kernel/lib/yk_var.hpp +++ b/src/kernel/lib/yk_var.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/lib/yk_var_apis.cpp b/src/kernel/lib/yk_var_apis.cpp index 071814da..7316c4dc 100644 --- a/src/kernel/lib/yk_var_apis.cpp +++ b/src/kernel/lib/yk_var_apis.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/swig/yask_kernel_api.i b/src/kernel/swig/yask_kernel_api.i index 1031d6b4..ad21c3d0 100644 --- a/src/kernel/swig/yask_kernel_api.i +++ b/src/kernel/swig/yask_kernel_api.i @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/tests/var_test.cpp b/src/kernel/tests/var_test.cpp index bd02dced..f90f7094 100644 --- a/src/kernel/tests/var_test.cpp +++ b/src/kernel/tests/var_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/tests/yask_kernel_api_exception_test.cpp b/src/kernel/tests/yask_kernel_api_exception_test.cpp index cde759e7..40c37c7b 100644 --- a/src/kernel/tests/yask_kernel_api_exception_test.cpp +++ b/src/kernel/tests/yask_kernel_api_exception_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/tests/yask_kernel_api_exception_test.py b/src/kernel/tests/yask_kernel_api_exception_test.py index 9339ade6..3ba937d6 100755 --- a/src/kernel/tests/yask_kernel_api_exception_test.py +++ b/src/kernel/tests/yask_kernel_api_exception_test.py @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/tests/yask_kernel_api_test.cpp b/src/kernel/tests/yask_kernel_api_test.cpp index 254c5723..342e4a33 100644 --- a/src/kernel/tests/yask_kernel_api_test.cpp +++ b/src/kernel/tests/yask_kernel_api_test.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/tests/yask_kernel_api_test.py b/src/kernel/tests/yask_kernel_api_test.py index 11dd1897..3dba26e8 100755 --- a/src/kernel/tests/yask_kernel_api_test.py +++ b/src/kernel/tests/yask_kernel_api_test.py @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/yask.sh b/src/kernel/yask.sh index 5d450efe..a7d50891 100755 --- a/src/kernel/yask.sh +++ b/src/kernel/yask.sh @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/src/kernel/yask_main.cpp b/src/kernel/yask_main.cpp index a1e4e09e..2c8288ea 100644 --- a/src/kernel/yask_main.cpp +++ b/src/kernel/yask_main.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -217,7 +217,7 @@ struct MySettings { " \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n" " \u2502 Y.A.S.K. \u2500\u2500 Yet Another Stencil Kit \u2502\n" " \u2502 https://github.com/intel/yask \u2502\n" - " \u2502 Copyright (c) 2014-2020, Intel Corporation \u2502\n" + " \u2502 Copyright (c) 2014-2021, Intel Corporation \u2502\n" " \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n" "\n" "Version: " << yask_get_version_string() << endl << diff --git a/src/stencils/AwpStencil.cpp b/src/stencils/AwpStencil.cpp index 03cfc8f8..73bae7f3 100644 --- a/src/stencils/AwpStencil.cpp +++ b/src/stencils/AwpStencil.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/ElasticStencil/Elastic2Stencil.hpp b/src/stencils/ElasticStencil/Elastic2Stencil.hpp index cf0c8f05..6c5a0781 100644 --- a/src/stencils/ElasticStencil/Elastic2Stencil.hpp +++ b/src/stencils/ElasticStencil/Elastic2Stencil.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/ElasticStencil/ElasticStencil.hpp b/src/stencils/ElasticStencil/ElasticStencil.hpp index 7475aef7..9832fa51 100644 --- a/src/stencils/ElasticStencil/ElasticStencil.hpp +++ b/src/stencils/ElasticStencil/ElasticStencil.hpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/FSGElastic2Stencil.cpp b/src/stencils/FSGElastic2Stencil.cpp index 2aaeb1af..d13cff7c 100644 --- a/src/stencils/FSGElastic2Stencil.cpp +++ b/src/stencils/FSGElastic2Stencil.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/FSGElasticStencil.cpp b/src/stencils/FSGElasticStencil.cpp index 9c9637ba..b25bdd76 100644 --- a/src/stencils/FSGElasticStencil.cpp +++ b/src/stencils/FSGElasticStencil.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/Iso3dfdStencil.cpp b/src/stencils/Iso3dfdStencil.cpp index b50e6815..5e34b539 100644 --- a/src/stencils/Iso3dfdStencil.cpp +++ b/src/stencils/Iso3dfdStencil.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/SSGElastic2Stencil.cpp b/src/stencils/SSGElastic2Stencil.cpp index 4b974547..8fdd753f 100644 --- a/src/stencils/SSGElastic2Stencil.cpp +++ b/src/stencils/SSGElastic2Stencil.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/SSGElasticStencil.cpp b/src/stencils/SSGElasticStencil.cpp index e43b3102..4c64d729 100644 --- a/src/stencils/SSGElasticStencil.cpp +++ b/src/stencils/SSGElasticStencil.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/SimpleStencils.cpp b/src/stencils/SimpleStencils.cpp index 432e78e4..0978e81f 100644 --- a/src/stencils/SimpleStencils.cpp +++ b/src/stencils/SimpleStencils.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/TTIStencil.cpp b/src/stencils/TTIStencil.cpp index 736ce17f..e599e552 100644 --- a/src/stencils/TTIStencil.cpp +++ b/src/stencils/TTIStencil.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/stencils/TestStencils.cpp b/src/stencils/TestStencils.cpp index 9967c145..61fc9a90 100644 --- a/src/stencils/TestStencils.cpp +++ b/src/stencils/TestStencils.cpp @@ -1,7 +1,7 @@ /***************************************************************************** YASK: Yet Another Stencil Kit -Copyright (c) 2014-2020, Intel Corporation +Copyright (c) 2014-2021, Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/analyze_trace.pl b/utils/bin/analyze_trace.pl index d6fbe051..483712bc 100755 --- a/utils/bin/analyze_trace.pl +++ b/utils/bin/analyze_trace.pl @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/convert_v2_stencil.pl b/utils/bin/convert_v2_stencil.pl index 6548e4b4..37f5b31c 100755 --- a/utils/bin/convert_v2_stencil.pl +++ b/utils/bin/convert_v2_stencil.pl @@ -3,7 +3,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/gen_layouts.pl b/utils/bin/gen_layouts.pl index d30bb9ea..44d76df4 100755 --- a/utils/bin/gen_layouts.pl +++ b/utils/bin/gen_layouts.pl @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/gen_loops.pl b/utils/bin/gen_loops.pl index c041a763..8370750d 100755 --- a/utils/bin/gen_loops.pl +++ b/utils/bin/gen_loops.pl @@ -3,7 +3,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/view_asm.pl b/utils/bin/view_asm.pl index 881fea96..21e9607a 100755 --- a/utils/bin/view_asm.pl +++ b/utils/bin/view_asm.pl @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/yask_log_to_csv.pl b/utils/bin/yask_log_to_csv.pl index e9766b89..ce164ac3 100755 --- a/utils/bin/yask_log_to_csv.pl +++ b/utils/bin/yask_log_to_csv.pl @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/yask_tuner.pl b/utils/bin/yask_tuner.pl index f9f26f73..799dcf59 100755 --- a/utils/bin/yask_tuner.pl +++ b/utils/bin/yask_tuner.pl @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/bin/yask_tuner_summary.csh b/utils/bin/yask_tuner_summary.csh index 54d9740c..1a2fa86c 100755 --- a/utils/bin/yask_tuner_summary.csh +++ b/utils/bin/yask_tuner_summary.csh @@ -2,7 +2,7 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/lib/CmdLine.pm b/utils/lib/CmdLine.pm index d95f5da5..78430241 100644 --- a/utils/lib/CmdLine.pm +++ b/utils/lib/CmdLine.pm @@ -1,6 +1,6 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to diff --git a/utils/lib/YaskUtils.pm b/utils/lib/YaskUtils.pm index 9d574c54..4ffd28e2 100644 --- a/utils/lib/YaskUtils.pm +++ b/utils/lib/YaskUtils.pm @@ -1,6 +1,6 @@ ############################################################################## ## YASK: Yet Another Stencil Kit -## Copyright (c) 2014-2020, Intel Corporation +## Copyright (c) 2014-2021, Intel Corporation ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to