Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
libclfft
Commits
df784a50
Commit
df784a50
authored
Mar 16, 2011
by
Oliver Bock
Browse files
Added missing pieces to restore Linux compatibility
parent
27bcad1f
Changes
3
Hide whitespace changes
Inline
Side-by-side
example/main.cpp
View file @
df784a50
...
...
@@ -89,8 +89,6 @@ cl_device_id device_id;
cl_context
context
;
cl_command_queue
queue
;
typedef
unsigned
long
long
ulong
;
#ifdef __APPLE__
double
subtractTimes
(
uint64_t
endTime
,
uint64_t
startTime
)
{
...
...
@@ -382,16 +380,19 @@ int runTest(clFFT_Dim3 n, int batchSize, clFFT_Direction dir, clFFT_Dimension di
{
cl_int
err
=
CL_SUCCESS
;
int
iter
;
#ifdef __APPLE__
double
t
;
uint64_t
t0
,
t1
;
int
mx
=
log2
(
n
.
x
);
int
my
=
log2
(
n
.
y
);
int
mz
=
log2
(
n
.
z
);
int
length
=
n
.
x
*
n
.
y
*
n
.
z
*
batchSize
;
double
gflops
=
5e-9
*
((
double
)
mx
+
(
double
)
my
+
(
double
)
mz
)
*
(
double
)
n
.
x
*
(
double
)
n
.
y
*
(
double
)
n
.
z
*
(
double
)
batchSize
*
(
double
)
numIter
;
#endif
int
length
=
n
.
x
*
n
.
y
*
n
.
z
*
batchSize
;
clFFT_SplitComplex
data_i_split
=
(
clFFT_SplitComplex
)
{
NULL
,
NULL
};
clFFT_SplitComplex
data_cl_split
=
(
clFFT_SplitComplex
)
{
NULL
,
NULL
};
...
...
@@ -540,8 +541,10 @@ int runTest(clFFT_Dim3 n, int batchSize, clFFT_Direction dir, clFFT_Dimension di
err
=
CL_SUCCESS
;
#ifdef __APPLE__
t0
=
mach_absolute_time
();
#endif
if
(
dataFormat
==
clFFT_SplitComplexFormat
)
{
for
(
iter
=
0
;
iter
<
numIter
;
iter
++
)
...
...
src/fft_kernelstring.cpp
View file @
df784a50
...
...
@@ -52,6 +52,7 @@
#include
<iostream>
#include
<sstream>
#include
<string>
#include
<string.h>
#include
<assert.h>
#include
"fft_internal.h"
#include
"clFFT.h"
...
...
src/fft_setup.cpp
View file @
df784a50
...
...
@@ -55,6 +55,7 @@
#include
<iostream>
#include
<string>
#include
<sstream>
#include
<limits.h>
using
namespace
std
;
...
...
@@ -398,4 +399,4 @@ void clFFT_DumpPlan( clFFT_Plan Plan, FILE *file)
kInfo
=
kInfo
->
next
;
}
fprintf
(
out
,
"%s
\n
"
,
plan
->
kernel_string
->
c_str
());
}
\ No newline at end of file
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment