Skip to content

Commit 2a48e06

Browse files
committed
Making all the inputs consts
1 parent 7990c2c commit 2a48e06

Some content is hidden

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

41 files changed

+280
-280
lines changed

include/af/algorithm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ namespace af
324324
325325
\ingroup set_func_unique
326326
*/
327-
AFAPI array setunique(const array &in, bool is_sorted=false);
327+
AFAPI array setunique(const array &in, const bool is_sorted=false);
328328

329329
/**
330330
C++ Interface for performing union of two arrays
@@ -336,7 +336,7 @@ namespace af
336336
337337
\ingroup set_func_union
338338
*/
339-
AFAPI array setunion(const array &first, const array &second, bool is_unique=false);
339+
AFAPI array setunion(const array &first, const array &second, const bool is_unique=false);
340340

341341
/**
342342
C++ Interface for performing intersect of two arrays
@@ -348,7 +348,7 @@ namespace af
348348
349349
\ingroup set_func_intersect
350350
*/
351-
AFAPI array setintersect(const array &first, const array &second, bool is_unique=false);
351+
AFAPI array setintersect(const array &first, const array &second, const bool is_unique=false);
352352
}
353353
#endif
354354

include/af/arith.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ extern "C" {
642642
643643
\ingroup arith_func_add
644644
*/
645-
AFAPI af_err af_add (af_array *out, const af_array lhs, const af_array rhs, bool batch);
645+
AFAPI af_err af_add (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
646646

647647
/**
648648
C Interface for subtracting an array from another
@@ -655,7 +655,7 @@ extern "C" {
655655
656656
\ingroup arith_func_sub
657657
*/
658-
AFAPI af_err af_sub (af_array *out, const af_array lhs, const af_array rhs, bool batch);
658+
AFAPI af_err af_sub (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
659659

660660
/**
661661
C Interface for multiplying two arrays
@@ -668,7 +668,7 @@ extern "C" {
668668
669669
\ingroup arith_func_mul
670670
*/
671-
AFAPI af_err af_mul (af_array *out, const af_array lhs, const af_array rhs, bool batch);
671+
AFAPI af_err af_mul (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
672672

673673
/**
674674
C Interface for dividing an array from another
@@ -681,7 +681,7 @@ extern "C" {
681681
682682
\ingroup arith_func_div
683683
*/
684-
AFAPI af_err af_div (af_array *out, const af_array lhs, const af_array rhs, bool batch);
684+
AFAPI af_err af_div (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
685685

686686
/**
687687
C Interface for checking if an array is less than another
@@ -694,7 +694,7 @@ extern "C" {
694694
695695
\ingroup logic_func_lt
696696
*/
697-
AFAPI af_err af_lt (af_array *out, const af_array lhs, const af_array rhs, bool batch);
697+
AFAPI af_err af_lt (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
698698

699699
/**
700700
C Interface for checking if an array is greater than another
@@ -707,7 +707,7 @@ extern "C" {
707707
708708
\ingroup logic_func_gt
709709
*/
710-
AFAPI af_err af_gt (af_array *out, const af_array lhs, const af_array rhs, bool batch);
710+
AFAPI af_err af_gt (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
711711

712712
/**
713713
C Interface for checking if an array is less or equal to than another
@@ -720,7 +720,7 @@ extern "C" {
720720
721721
\ingroup logic_func_le
722722
*/
723-
AFAPI af_err af_le (af_array *out, const af_array lhs, const af_array rhs, bool batch);
723+
AFAPI af_err af_le (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
724724

725725
/**
726726
C Interface for checking if an array is greater than or equal another
@@ -733,7 +733,7 @@ extern "C" {
733733
734734
\ingroup logic_func_ge
735735
*/
736-
AFAPI af_err af_ge (af_array *out, const af_array lhs, const af_array rhs, bool batch);
736+
AFAPI af_err af_ge (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
737737

738738
/**
739739
C Interface for checking if an array is equal to another
@@ -746,7 +746,7 @@ extern "C" {
746746
747747
\ingroup logic_func_eq
748748
*/
749-
AFAPI af_err af_eq (af_array *out, const af_array lhs, const af_array rhs, bool batch);
749+
AFAPI af_err af_eq (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
750750

751751
/**
752752
C Interface for checking if an array is not equal to another
@@ -759,7 +759,7 @@ extern "C" {
759759
760760
\ingroup logic_func_neq
761761
*/
762-
AFAPI af_err af_neq (af_array *out, const af_array lhs, const af_array rhs, bool batch);
762+
AFAPI af_err af_neq (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
763763

764764
/**
765765
C Interface for performing logical and on two arrays
@@ -772,7 +772,7 @@ extern "C" {
772772
773773
\ingroup logic_func_and
774774
*/
775-
AFAPI af_err af_and (af_array *out, const af_array lhs, const af_array rhs, bool batch);
775+
AFAPI af_err af_and (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
776776

777777
/**
778778
C Interface for performing logical or on two arrays
@@ -785,7 +785,7 @@ extern "C" {
785785
786786
\ingroup logic_func_or
787787
*/
788-
AFAPI af_err af_or (af_array *out, const af_array lhs, const af_array rhs, bool batch);
788+
AFAPI af_err af_or (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
789789

790790
/**
791791
C Interface for performing logical not on input
@@ -809,7 +809,7 @@ extern "C" {
809809
810810
\ingroup logic_func_bitand
811811
*/
812-
AFAPI af_err af_bitand (af_array *out, const af_array lhs, const af_array rhs, bool batch);
812+
AFAPI af_err af_bitand (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
813813

814814
/**
815815
C Interface for performing bitwise or on two arrays
@@ -822,7 +822,7 @@ extern "C" {
822822
823823
\ingroup logic_func_bitor
824824
*/
825-
AFAPI af_err af_bitor (af_array *out, const af_array lhs, const af_array rhs, bool batch);
825+
AFAPI af_err af_bitor (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
826826

827827
/**
828828
C Interface for performing bitwise xor on two arrays
@@ -835,7 +835,7 @@ extern "C" {
835835
836836
\ingroup logic_func_bitxor
837837
*/
838-
AFAPI af_err af_bitxor (af_array *out, const af_array lhs, const af_array rhs, bool batch);
838+
AFAPI af_err af_bitxor (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
839839

840840
/**
841841
C Interface for left shfit on integer arrays
@@ -848,7 +848,7 @@ extern "C" {
848848
849849
\ingroup arith_func_shiftl
850850
*/
851-
AFAPI af_err af_bitshiftl(af_array *out, const af_array lhs, const af_array rhs, bool batch);
851+
AFAPI af_err af_bitshiftl(af_array *out, const af_array lhs, const af_array rhs, const bool batch);
852852

853853
/**
854854
C Interface for right shfit on integer arrays
@@ -861,7 +861,7 @@ extern "C" {
861861
862862
\ingroup arith_func_shiftr
863863
*/
864-
AFAPI af_err af_bitshiftr(af_array *out, const af_array lhs, const af_array rhs, bool batch);
864+
AFAPI af_err af_bitshiftr(af_array *out, const af_array lhs, const af_array rhs, const bool batch);
865865

866866
/**
867867
C Interface for casting an array from one type to another
@@ -873,7 +873,7 @@ extern "C" {
873873
874874
\ingroup helper_func_cast
875875
*/
876-
AFAPI af_err af_cast (af_array *out, const af_array in, af_dtype type);
876+
AFAPI af_err af_cast (af_array *out, const af_array in, const af_dtype type);
877877

878878
/**
879879
C Interface for min of two arrays
@@ -886,7 +886,7 @@ extern "C" {
886886
887887
\ingroup numeric_func_min
888888
*/
889-
AFAPI af_err af_minof (af_array *out, const af_array lhs, const af_array rhs, bool batch);
889+
AFAPI af_err af_minof (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
890890

891891
/**
892892
C Interface for max of two arrays
@@ -899,7 +899,7 @@ extern "C" {
899899
900900
\ingroup numeric_func_max
901901
*/
902-
AFAPI af_err af_maxof (af_array *out, const af_array lhs, const af_array rhs, bool batch);
902+
AFAPI af_err af_maxof (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
903903

904904
/**
905905
C Interface for remainder
@@ -912,7 +912,7 @@ extern "C" {
912912
913913
\ingroup numeric_func_rem
914914
*/
915-
AFAPI af_err af_rem (af_array *out, const af_array lhs, const af_array rhs, bool batch);
915+
AFAPI af_err af_rem (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
916916

917917
/**
918918
C Interface for modulus
@@ -925,7 +925,7 @@ extern "C" {
925925
926926
\ingroup numeric_func_mod
927927
*/
928-
AFAPI af_err af_mod (af_array *out, const af_array lhs, const af_array rhs, bool batch);
928+
AFAPI af_err af_mod (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
929929

930930
/**
931931
C Interface for absolute value
@@ -984,7 +984,7 @@ extern "C" {
984984
985985
\ingroup numeric_func_floor
986986
*/
987-
AFAPI af_err af_hypot (af_array *out, const af_array lhs, const af_array rhs, bool batch);
987+
AFAPI af_err af_hypot (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
988988

989989
/**
990990
C Interface for sin
@@ -1063,7 +1063,7 @@ extern "C" {
10631063
10641064
\ingroup trig_func_atan
10651065
*/
1066-
AFAPI af_err af_atan2 (af_array *out, const af_array lhs, const af_array rhs, bool batch);
1066+
AFAPI af_err af_atan2 (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
10671067

10681068
/**
10691069
C Interface for creating complex array from two input arrays
@@ -1076,7 +1076,7 @@ extern "C" {
10761076
10771077
\ingroup complex_func_cplx
10781078
*/
1079-
AFAPI af_err af_cplx2 (af_array *out, const af_array lhs, const af_array rhs, bool batch);
1079+
AFAPI af_err af_cplx2 (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
10801080

10811081
/**
10821082
C Interface for creating complex array from real array
@@ -1199,7 +1199,7 @@ extern "C" {
11991199
12001200
\ingroup explog_func_pow
12011201
*/
1202-
AFAPI af_err af_pow (af_array *out, const af_array lhs, const af_array rhs, bool batch);
1202+
AFAPI af_err af_pow (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
12031203

12041204
/**
12051205
C Interface for exponential of an array

include/af/blas.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ namespace af
4646
\ingroup blas_func_matmul
4747
*/
4848
AFAPI array matmul(const array &lhs, const array &rhs,
49-
af_transpose_t optLhs = AF_NO_TRANS,
50-
af_transpose_t optRhs = AF_NO_TRANS);
49+
const af::trans optLhs = AF_NO_TRANS,
50+
const af::trans optRhs = AF_NO_TRANS);
5151

5252
/**
5353
\brief Matrix multiply on two arrays
@@ -102,8 +102,8 @@ namespace af
102102
\ingroup blas_func_dot
103103
*/
104104
AFAPI array dot (const array &lhs, const array &rhs,
105-
af_transpose_t optLhs = AF_NO_TRANS,
106-
af_transpose_t optRhs = AF_NO_TRANS);
105+
const af::trans optLhs = AF_NO_TRANS,
106+
const af::trans optRhs = AF_NO_TRANS);
107107

108108
/**
109109
\brief Transposes a matrix
@@ -144,7 +144,7 @@ extern "C" {
144144
*/
145145
AFAPI af_err af_matmul( af_array *out ,
146146
const af_array lhs, const af_array rhs,
147-
af_transpose_t optLhs, af_transpose_t optRhs);
147+
const af_transpose_t optLhs, const af_transpose_t optRhs);
148148

149149

150150
/**
@@ -161,7 +161,7 @@ extern "C" {
161161

162162
AFAPI af_err af_dot( af_array *out,
163163
const af_array lhs, const af_array rhs,
164-
af_transpose_t optLhs, af_transpose_t optRhs);
164+
const af_transpose_t optLhs, const af_transpose_t optRhs);
165165

166166
/**
167167
\brief Transposes a matrix

0 commit comments

Comments
 (0)