Commit c2da3a21 authored by Marc Modat's avatar Marc Modat

I ran the code through astyle for formatting purpose

parent 7d4d44e0
......@@ -3,18 +3,18 @@
int main()
{
int deviceCount=0;
cudaError_t cudaResultCode = cudaGetDeviceCount(&deviceCount);
int deviceCount=0;
cudaError_t cudaResultCode = cudaGetDeviceCount(&deviceCount);
// Error when running cudaGetDeviceCount
if(cudaResultCode != cudaSuccess) // cudaSuccess=0
return EXIT_FAILURE;
// Error when running cudaGetDeviceCount
if(cudaResultCode != cudaSuccess) // cudaSuccess=0
return EXIT_FAILURE;
// Returns an error if no cuda card has been detected
if(deviceCount==0)
return EXIT_FAILURE;
// Returns an error if no cuda card has been detected
if(deviceCount==0)
return EXIT_FAILURE;
// Returns success if the code ran fine and at least 1 card
// has been detected
return EXIT_SUCCESS;
// Returns success if the code ran fine and at least 1 card
// has been detected
return EXIT_SUCCESS;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,14 +12,14 @@
*/
char xml_average[] =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<executable>\n"
" <category>Registration.NiftyReg</category>\n"
" <title>RegAverage (NiftyReg)</title>\n"
" <description><![CDATA[NiftyReg module under construction]]></description>\n"
" <version>0.0.1</version>\n"
" <documentation-url>http://cmic.cs.ucl.ac.uk/home/software/</documentation-url>\n"
" <license>BSD</license>\n"
" <contributor>Marc Modat (UCL)</contributor>\n"
"</executable>"
;
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<executable>\n"
" <category>Registration.NiftyReg</category>\n"
" <title>RegAverage (NiftyReg)</title>\n"
" <description><![CDATA[NiftyReg module under construction]]></description>\n"
" <version>0.0.1</version>\n"
" <documentation-url>http://cmic.cs.ucl.ac.uk/home/software/</documentation-url>\n"
" <license>BSD</license>\n"
" <contributor>Marc Modat (UCL)</contributor>\n"
"</executable>"
;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,14 +12,14 @@
*/
char xml_transform[] =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<executable>\n"
" <category>Registration.NiftyReg</category>\n"
" <title>RegTransform (NiftyReg)</title>\n"
" <description><![CDATA[NiftyReg module under construction]]></description>\n"
" <version>0.0.1</version>\n"
" <documentation-url>http://cmic.cs.ucl.ac.uk/home/software/</documentation-url>\n"
" <license>BSD</license>\n"
" <contributor>Marc Modat (UCL)</contributor>\n"
"</executable>"
;
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<executable>\n"
" <category>Registration.NiftyReg</category>\n"
" <title>RegTransform (NiftyReg)</title>\n"
" <description><![CDATA[NiftyReg module under construction]]></description>\n"
" <version>0.0.1</version>\n"
" <documentation-url>http://cmic.cs.ucl.ac.uk/home/software/</documentation-url>\n"
" <license>BSD</license>\n"
" <contributor>Marc Modat (UCL)</contributor>\n"
"</executable>"
;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -20,7 +20,7 @@ znzlib.h (zipped or non-zipped library)
This library provides an interface to both compressed (gzip/zlib) and
uncompressed (normal) file IO. The functions are written to have the
same interface as the standard file IO functions.
same interface as the standard file IO functions.
To use this library instead of normal file IO, the following changes
are required:
......@@ -30,7 +30,7 @@ are required:
- add a third parameter to all calls to znzopen (previously fopen)
that specifies whether to use compression (1) or not (0)
- use znz_isnull rather than any (pointer == NULL) comparisons in the code
NB: seeks for writable files with compression are quite restricted
*/
......@@ -40,19 +40,19 @@ NB: seeks for writable files with compression are quite restricted
#ifdef __cplusplus
extern "C" {
#endif
/*=================*/
/*=================*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
/* include optional check for HAVE_FDOPEN here, from deleted config.h:
/* include optional check for HAVE_FDOPEN here, from deleted config.h:
uncomment the following line if fdopen() exists for your compiler and
compiler options
*/
/* #define HAVE_FDOPEN */
uncomment the following line if fdopen() exists for your compiler and
compiler options
*/
/* #define HAVE_FDOPEN */
#ifdef HAVE_ZLIB
......@@ -64,57 +64,58 @@ extern "C" {
#endif
struct znzptr {
int withz;
FILE* nzfptr;
struct znzptr
{
int withz;
FILE* nzfptr;
#ifdef HAVE_ZLIB
gzFile zfptr;
gzFile zfptr;
#endif
} ;
} ;
/* the type for all file pointers */
typedef struct znzptr * znzFile;
/* the type for all file pointers */
typedef struct znzptr * znzFile;
/* int znz_isnull(znzFile f); */
/* int znzclose(znzFile f); */
/* int znz_isnull(znzFile f); */
/* int znzclose(znzFile f); */
#define znz_isnull(f) ((f) == NULL)
#define znzclose(f) Xznzclose(&(f))
/* Note extra argument (use_compression) where
use_compression==0 is no compression
use_compression!=0 uses zlib (gzip) compression
*/
/* Note extra argument (use_compression) where
use_compression==0 is no compression
use_compression!=0 uses zlib (gzip) compression
*/
znzFile znzopen(const char *path, const char *mode, int use_compression);
znzFile znzopen(const char *path, const char *mode, int use_compression);
znzFile znzdopen(int fd, const char *mode, int use_compression);
znzFile znzdopen(int fd, const char *mode, int use_compression);
int Xznzclose(znzFile * file);
int Xznzclose(znzFile * file);
size_t znzread(void* buf, size_t size, size_t nmemb, znzFile file);
size_t znzread(void* buf, size_t size, size_t nmemb, znzFile file);
size_t znzwrite(const void* buf, size_t size, size_t nmemb, znzFile file);
size_t znzwrite(const void* buf, size_t size, size_t nmemb, znzFile file);
long znzseek(znzFile file, long offset, int whence);
long znzseek(znzFile file, long offset, int whence);
int znzrewind(znzFile stream);
int znzrewind(znzFile stream);
long znztell(znzFile file);
long znztell(znzFile file);
int znzputs(const char *str, znzFile file);
int znzputs(const char *str, znzFile file);
char * znzgets(char* str, int size, znzFile file);
char * znzgets(char* str, int size, znzFile file);
int znzputc(int c, znzFile file);
int znzputc(int c, znzFile file);
int znzgetc(znzFile file);
int znzgetc(znzFile file);
#if !defined(WIN32)
int znzprintf(znzFile stream, const char *format, ...);
int znzprintf(znzFile stream, const char *format, ...);
#endif
/*=================*/
/*=================*/
#ifdef __cplusplus
}
#endif
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* _reg_resampling_gpu.h
*
*
*
* Created by Marc Modat on 24/03/2009.
* Copyright (c) 2009, University College London. All rights reserved.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.