Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
f12bd95c
There was an error fetching the commit references. Please try again later.
Commit
f12bd95c
authored
6 years ago
by
Nina Džugasová
Committed by
Tomáš Oberhuber
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation of File.
parent
bcb3df95
No related branches found
No related tags found
1 merge request
!15
Nina
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TNL/File.h
+11
-3
11 additions, 3 deletions
src/TNL/File.h
src/TNL/Timer.h
+5
-1
5 additions, 1 deletion
src/TNL/Timer.h
with
16 additions
and
4 deletions
src/TNL/File.h
+
11
−
3
View file @
f12bd95c
...
...
@@ -37,7 +37,7 @@ enum class IOMode
const
size_t
FileGPUvsCPUTransferBufferSize
=
5
*
2
<<
20
;
/// Class file is aimed mainly for the binary data.
It supports transparent compression.
/// Class file is aimed mainly for the binary data.
class
File
{
IOMode
mode
;
...
...
@@ -66,21 +66,23 @@ class File
/// Opens file with given \e fileName and returns true/false based on the success in opening the file.
/// \param fileName String which indicates name of the file user wants to open.
/// \param mode Indicates what user needs to do with opened file.
/// Modes to choose: IOMode::read or IOMode::write.
/// Modes to choose: IOMode::read or IOMode::write
or IOMode::undefined
.
bool
open
(
const
String
&
fileName
,
const
IOMode
mode
);
/// \brief Returns name of given file.
const
String
&
getFileName
()
const
{
return
this
->
fileName
;
}
/// Returns read elements.
long
int
getReadElements
()
const
{
return
this
->
readElements
;
}
/// Returns written elements.
long
int
getWrittenElements
()
const
{
return
this
->
writtenElements
;
...
...
@@ -90,6 +92,7 @@ class File
bool
read
(
Type
*
buffer
,
const
Index
&
elements
);
// Toto je treba??
template
<
typename
Type
,
typename
Device
=
Devices
::
Host
>
bool
read
(
Type
*
buffer
);
...
...
@@ -97,6 +100,7 @@ class File
bool
write
(
const
Type
*
buffer
,
const
Index
elements
);
// Toto je treba?
template
<
typename
Type
,
typename
Device
=
Devices
::
Host
>
bool
write
(
const
Type
*
buffer
);
...
...
@@ -147,6 +151,10 @@ protected:
const
std
::
size_t
&
elements
);
};
/// Returns true if the file exists and false otherwise.
///
/// Finds out if the file \e fileName exists.
/// \param fileName Name of the file that user wants to find in the PC.
bool
fileExists
(
const
String
&
fileName
);
}
// namespace TNL
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Timer.h
+
5
−
1
View file @
f12bd95c
...
...
@@ -100,7 +100,10 @@ class Timer
///
/// Knows whether the timer is currently stopped or not.
bool
stopState
;
/// \brief Time Stamp Counter returning number of CPU cycles since reset.
///
/// Only for x86 compatibile CPUs.
inline
unsigned
long
long
rdtsc
()
const
{
unsigned
hi
,
lo
;
...
...
@@ -109,6 +112,7 @@ class Timer
}
};
// !!! Odstranit ???!!!
extern
Timer
defaultTimer
;
}
// namespace TNL
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment