diff options
Diffstat (limited to 'src/auxiliaryFunctions/isempty')
-rw-r--r-- | src/auxiliaryFunctions/isempty/Makefile | 43 | ||||
-rw-r--r-- | src/auxiliaryFunctions/isempty/cisEmptya.c | 24 | ||||
-rw-r--r-- | src/auxiliaryFunctions/isempty/disEmptya.c | 23 | ||||
-rw-r--r-- | src/auxiliaryFunctions/isempty/isEmpty.h | 37 | ||||
-rw-r--r-- | src/auxiliaryFunctions/isempty/sisEmptya.c | 23 | ||||
-rw-r--r-- | src/auxiliaryFunctions/isempty/zisEmptya.c | 24 |
6 files changed, 174 insertions, 0 deletions
diff --git a/src/auxiliaryFunctions/isempty/Makefile b/src/auxiliaryFunctions/isempty/Makefile new file mode 100644 index 00000000..85aff443 --- /dev/null +++ b/src/auxiliaryFunctions/isempty/Makefile @@ -0,0 +1,43 @@ +## +## -*- makefile -*- +## +## Makefile +## Made by Bruno JOFRET <bruno.jofret@inria.fr> +## +## Started on Thu Nov 30 16:33:40 2006 jofret +## Last update Wed Feb 14 14:38:13 2007 jofret +## +## Copyright INRIA 2006 +## + +NAME = ../../lib/libIsEmpty.a + +RM = rm -f +CC = gcc +INCLUDE = -I ../../type -I ../../misc +LINK = -L ../../lib +CFLAGS = -Werror -Wall -pedantic -ansi $(INCLUDE) $(LINK) $(STANDARD) +AR = ar cru +RANLIB = ranlib + +SRC = sisEmptya.c \ + disEmptya.c \ + cisEmptya.c \ + zisEmptya.c + +HEAD = isEmpty.h +OBJ = $(SRC:.c=.o) + +all: $(NAME) + +$(NAME) : $(HEAD) $(OBJ) + $(AR) $@ $(OBJ) + $(RANLIB) $@ + +clean: + $(RM) $(OBJ) + +distclean: clean + $(RM) $(NAME) + +re: clean all diff --git a/src/auxiliaryFunctions/isempty/cisEmptya.c b/src/auxiliaryFunctions/isempty/cisEmptya.c new file mode 100644 index 00000000..bbaa71ea --- /dev/null +++ b/src/auxiliaryFunctions/isempty/cisEmptya.c @@ -0,0 +1,24 @@ +/* +** -*- C -*- +** +** cisEmptya.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Wed Feb 14 15:33:30 2007 jofret +** Last update Wed Feb 14 15:35:29 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include <stdbool.h> +#include "notFound.h" +#include "floatComplex.h" + +int cfinda(floatComplex*, int); + +bool cisEmptya(floatComplex* x, int size) { + if (cfinda(x, size) == NOT_FOUND) { + return true; + } + return false; +} diff --git a/src/auxiliaryFunctions/isempty/disEmptya.c b/src/auxiliaryFunctions/isempty/disEmptya.c new file mode 100644 index 00000000..7ffb3a1a --- /dev/null +++ b/src/auxiliaryFunctions/isempty/disEmptya.c @@ -0,0 +1,23 @@ +/* +** -*- C -*- +** +** disEmptya.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Wed Feb 14 15:29:27 2007 jofret +** Last update Wed Feb 14 15:29:54 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include <stdbool.h> +#include "notFound.h" + +int dfinda(double*, int); + +bool disEmptya(double* x, int size) { + if (dfinda(x, size) == NOT_FOUND) { + return true; + } + return false; +} diff --git a/src/auxiliaryFunctions/isempty/isEmpty.h b/src/auxiliaryFunctions/isempty/isEmpty.h new file mode 100644 index 00000000..40a9ad3e --- /dev/null +++ b/src/auxiliaryFunctions/isempty/isEmpty.h @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** find.h +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Thu Feb 8 10:12:17 2007 jofret +** Last update Wed Feb 14 14:43:53 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#ifndef __IS_EMPTY_H__ +#define __IS_EMPTY_H__ + +#include <bool.h> + +/* +** \brief Float Is Empty function +*/ +bool sisEmptya(float* x, int size); + +/* +** \brief Double Is Empty function +*/ +bool disEmptya(double*x, int size); + +/* +** \brief Float Complex Is Empty function +*/ +bool cisEmptya(floatComplex* z, int size); + +/* +** \brief Double Complex Is Empty function +*/ +bool zisEmptya(doubleComplex* z, int size); +#endif /* !__IS_EMPTY_H__ */ diff --git a/src/auxiliaryFunctions/isempty/sisEmptya.c b/src/auxiliaryFunctions/isempty/sisEmptya.c new file mode 100644 index 00000000..af8a9860 --- /dev/null +++ b/src/auxiliaryFunctions/isempty/sisEmptya.c @@ -0,0 +1,23 @@ +/* +** -*- C -*- +** +** sisEmptya.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Wed Feb 14 14:59:33 2007 jofret +** Last update Wed Feb 14 15:25:32 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include <stdbool.h> +#include "notFound.h" + +int sfinda(float*, int); + +bool sisEmptya(float* x, int size) { + if (sfinda(x, size) == NOT_FOUND) { + return true; + } + return false; +} diff --git a/src/auxiliaryFunctions/isempty/zisEmptya.c b/src/auxiliaryFunctions/isempty/zisEmptya.c new file mode 100644 index 00000000..02e0ce53 --- /dev/null +++ b/src/auxiliaryFunctions/isempty/zisEmptya.c @@ -0,0 +1,24 @@ +/* +** -*- C -*- +** +** zisEmptya.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Wed Feb 14 15:34:28 2007 jofret +** Last update Wed Feb 14 15:40:02 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include <stdbool.h> +#include "notFound.h" +#include "doubleComplex.h" + +int zfinda(doubleComplex*, int); + +bool zisEmptya(doubleComplex* x, int size) { + if (zfinda(x, size) == NOT_FOUND) { + return true; + } + return false; +} |