Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
IAtari
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
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
Show more breadcrumbs
Gontier Antonin
IAtari
Commits
0331c0f5
Commit
0331c0f5
authored
6 years ago
by
Gontier Antonin
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev'
Reprise propre du git
parents
16efb9b7
61cc0c0f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Utils.h
+0
-59
0 additions, 59 deletions
src/Utils.h
with
0 additions
and
59 deletions
src/Utils.h
deleted
100755 → 0
+
0
−
59
View file @
16efb9b7
/*
This file is part of Leela Zero.
Copyright (C) 2017 Gian-Carlo Pascutto
Leela Zero is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Leela Zero is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Leela Zero. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UTILS_H_DEFINED
#define UTILS_H_DEFINED
#include
<atomic>
#include
<limits>
#include
"ThreadPool.h"
#include
<vector>
#include
<ale_interface.hpp>
#include
<SDL.h>
extern
Utils
::
ThreadPool
thread_pool
;
extern
ALEInterface
ALE
;
namespace
Utils
{
template
<
class
T
>
void
atomic_add
(
std
::
atomic
<
T
>
&
f
,
T
d
)
{
T
old
=
f
.
load
();
while
(
!
f
.
compare_exchange_weak
(
old
,
old
+
d
));
}
template
<
typename
T
>
T
rotl
(
const
T
x
,
const
int
k
)
{
return
(
x
<<
k
)
|
(
x
>>
(
std
::
numeric_limits
<
T
>::
digits
-
k
));
}
inline
bool
is7bit
(
int
c
)
{
return
c
>=
0
&&
c
<=
127
;
}
size_t
ceilMultiple
(
size_t
a
,
size_t
b
);
inline
int
secam_to_range_index
(
int
i
);
void
secam210x160_to_42x32
(
const
std
::
vector
<
unsigned
char
>&
screen
,
std
::
vector
<
unsigned
char
>&
screen42x32
);
void
init_ALE
();
}
#endif
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