Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nifty_gridder
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ift
nifty_gridder
Commits
bc639623
Commit
bc639623
authored
Oct 24, 2019
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add warnings are arrays have bad strides
parent
954f7419
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
gridder_cxx.h
gridder_cxx.h
+10
-0
No files found.
gridder_cxx.h
View file @
bc639623
...
...
@@ -112,6 +112,14 @@ template<typename T, size_t ndim> class mav
ptrdiff_t
stride
(
size_t
i
)
const
{
return
str
[
i
];
}
T
*
data
()
const
{
return
d
;
}
bool
last_contiguous
()
const
{
return
(
str
[
ndim
-
1
]
==
1
)
||
(
str
[
ndim
-
1
]
==
0
);
}
void
check_storage
(
const
char
*
name
)
const
{
if
(
!
last_contiguous
())
cout
<<
"Array '"
<<
name
<<
"': last dimension is not contiguous.
\n
"
"This may slow down computation significantly!
\n
"
;
}
bool
contiguous
()
const
{
ptrdiff_t
stride
=
1
;
...
...
@@ -954,6 +962,8 @@ template<class T, class T2> class MsServ
:
baselines
(
baselines_
),
idx
(
idx_
),
ms
(
ms_
),
wgt
(
wgt_
),
nvis
(
idx
.
shape
(
0
)),
have_wgt
(
wgt
.
size
()
!=
0
)
{
wgt
.
check_storage
(
"wgt"
);
ms
.
check_storage
(
"ms"
);
checkShape
(
ms
.
shape
(),
{
baselines
.
Nrows
(),
baselines
.
Nchannels
()});
if
(
have_wgt
)
checkShape
(
wgt
.
shape
(),
ms
.
shape
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment