Commit 7ada0a4897befbc9f33b957f4b046d3779ad3448
1 parent
e318123b
fixed the bugs with filename.h, vec3 NVCC directive
Showing
3 changed files
with
15 additions
and
14 deletions
Show diff stats
stim/grids/image_stack.h
... | ... | @@ -33,10 +33,10 @@ public: |
33 | 33 | stim::filename file_path(file_mask); |
34 | 34 | |
35 | 35 | //if the file path is relative, update it with the current working directory |
36 | - if(file_path.is_relative()){ | |
37 | - stim::filename wd = stim::filename::cwd(); | |
38 | - file_path = wd.get_relative(file_mask); | |
39 | - } | |
36 | +// if(file_path.is_relative()){ | |
37 | +// stim::filename wd = stim::filename::cwd(); | |
38 | +// file_path = wd.get_relative(file_mask); | |
39 | +// } | |
40 | 40 | |
41 | 41 | //get the list of files |
42 | 42 | std::vector<stim::filename> file_list = file_path.get_list(); |
... | ... | @@ -134,10 +134,10 @@ public: |
134 | 134 | stim::filename file_path(file_mask); |
135 | 135 | |
136 | 136 | //if the file path is relative, update it with the current working directory |
137 | - if(file_path.is_relative()){ | |
138 | - stim::filename wd = stim::filename::cwd(); | |
139 | - file_path = wd.get_relative(file_mask); | |
140 | - } | |
137 | +// if(file_path.is_relative()){ | |
138 | +// stim::filename wd = stim::filename::cwd(); | |
139 | +// file_path = wd.get_relative(file_mask); | |
140 | +// } | |
141 | 141 | |
142 | 142 | //create a list of file names |
143 | 143 | std::vector<std::string> file_list = stim::wildcards::increment(file_path.str(), 0, R[3]-1, 1); | ... | ... |
stim/math/vec3.h
... | ... | @@ -216,7 +216,6 @@ public: |
216 | 216 | return result; |
217 | 217 | } |
218 | 218 | |
219 | -#ifndef __NVCC__ | |
220 | 219 | /// Outputs the vector as a string |
221 | 220 | std::string str() const{ |
222 | 221 | std::stringstream ss; |
... | ... | @@ -234,7 +233,6 @@ public: |
234 | 233 | |
235 | 234 | return ss.str(); |
236 | 235 | } |
237 | -#endif | |
238 | 236 | |
239 | 237 | size_t size(){ return 3; } |
240 | 238 | ... | ... |
stim/parser/filename.h
... | ... | @@ -203,6 +203,9 @@ public: |
203 | 203 | operator=(s); |
204 | 204 | } |
205 | 205 | |
206 | + bool is_relative(){ | |
207 | + return false; | |
208 | + } | |
206 | 209 | |
207 | 210 | |
208 | 211 | std::string str(){ |
... | ... | @@ -331,7 +334,7 @@ public: |
331 | 334 | |
332 | 335 | #elif BOOST_PRECOMPILED |
333 | 336 | |
334 | - boost::filesystem::path p(dir()); //create a path from the current filename | |
337 | + boost::filesystem::path p(path()); //create a path from the current filename | |
335 | 338 | std::vector<stim::filename> file_list; |
336 | 339 | if(boost::filesystem::exists(p)){ |
337 | 340 | if(boost::filesystem::is_directory(p)){ |
... | ... | @@ -344,9 +347,9 @@ public: |
344 | 347 | for (vec::const_iterator it(v.begin()), it_end(v.end()); it != it_end; ++it) |
345 | 348 | { |
346 | 349 | //if the filename is a wild card *or* it matches the read file name |
347 | - if( prefix == "*" || prefix == (*it).filename().stem().string()){ | |
350 | + if( _prefix == "*" || _prefix == (*it).filename().stem().string()){ | |
348 | 351 | //if the extension is a wild card *or* it matches the read file extension |
349 | - if( ext == "*" || "." + ext == (*it).filename().extension().string()){ | |
352 | + if( _extension == "*" || "." + _extension == (*it).filename().extension().string()){ | |
350 | 353 | file_list.push_back((*it).string()); //include it in the final list |
351 | 354 | } |
352 | 355 | |
... | ... | @@ -368,4 +371,4 @@ public: |
368 | 371 | } |
369 | 372 | }; //end filename |
370 | 373 | } //end namespace stim |
371 | -#endif | |
372 | 374 | \ No newline at end of file |
375 | +#endif | ... | ... |