[arrayfire] 219/284: Move asserts inside try/catch in indexer functions in util
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit 3941550c448246601d21681202614067401ddad5
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Thu Jan 14 13:06:41 2016 -0500
Move asserts inside try/catch in indexer functions in util
---
src/api/c/util.cpp | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/api/c/util.cpp b/src/api/c/util.cpp
index cc9a07a..9b16fe9 100644
--- a/src/api/c/util.cpp
+++ b/src/api/c/util.cpp
@@ -30,45 +30,45 @@ af_err af_create_indexers(af_index_t** indexers)
af_err af_set_array_indexer(af_index_t* indexer, const af_array idx, const dim_t dim)
{
- ARG_ASSERT(0, (indexer!=NULL));
- ARG_ASSERT(1, (idx!=NULL));
- ARG_ASSERT(2, (dim>=0 && dim<=3));
try {
+ ARG_ASSERT(0, (indexer!=NULL));
+ ARG_ASSERT(1, (idx!=NULL));
+ ARG_ASSERT(2, (dim>=0 && dim<=3));
indexer[dim].idx.arr = idx;
indexer[dim].isBatch = false;
indexer[dim].isSeq = false;
}
CATCHALL
- return AF_SUCCESS;
+ return AF_SUCCESS;
}
af_err af_set_seq_indexer(af_index_t* indexer, const af_seq* idx, const dim_t dim, const bool is_batch)
{
- ARG_ASSERT(0, (indexer!=NULL));
- ARG_ASSERT(1, (idx!=NULL));
- ARG_ASSERT(2, (dim>=0 && dim<=3));
try {
+ ARG_ASSERT(0, (indexer!=NULL));
+ ARG_ASSERT(1, (idx!=NULL));
+ ARG_ASSERT(2, (dim>=0 && dim<=3));
indexer[dim].idx.seq = *idx;
indexer[dim].isBatch = is_batch;
indexer[dim].isSeq = true;
}
CATCHALL
- return AF_SUCCESS;
+ return AF_SUCCESS;
}
af_err af_set_seq_param_indexer(af_index_t* indexer,
const double begin, const double end, const double step,
const dim_t dim, const bool is_batch)
{
- ARG_ASSERT(0, (indexer!=NULL));
- ARG_ASSERT(4, (dim>=0 && dim<=3));
try {
+ ARG_ASSERT(0, (indexer!=NULL));
+ ARG_ASSERT(4, (dim>=0 && dim<=3));
indexer[dim].idx.seq = af_make_seq(begin, end, step);
indexer[dim].isBatch = is_batch;
indexer[dim].isSeq = true;
}
CATCHALL
- return AF_SUCCESS;
+ return AF_SUCCESS;
}
af_err af_release_indexers(af_index_t* indexers)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list