Permalink
Browse files

NIF version of the openCL binding

  • Loading branch information...
tonyrog committed Dec 28, 2010
1 parent caa5564 commit 4063eafebf591d24a708bd2d0b3cf95ba0202afe
Showing with 5,247 additions and 7,283 deletions.
  1. +10 −26 c_src/Makefile
  2. +0 −352 c_src/cbuf_test.c
  3. +0 −1,559 c_src/cbufv2.h
  4. +0 −92 c_src/cl_cpuid.h
  5. +0 −3,475 c_src/cl_drv.c
  6. +4,785 −109 c_src/cl_nif.c
  7. +2 −1 examples/Makefile
  8. +33 −69 examples/cl_bandwidth.erl
  9. +0 −3 src/Makefile
  10. +1 −3 src/cl.app.src
  11. +416 −753 src/cl.erl
  12. +0 −20 src/cl_app.erl
  13. +0 −511 src/cl_drv.erl
  14. +0 −274 src/cl_int.hrl
  15. +0 −36 src/cl_sup.erl
View
@@ -156,16 +156,13 @@ OCL_SIMD_OBJS = $(SIMD_OBJS:%=$(OBJDIR)/%)
all: all32 all64
-nif32: config.32.h
- $(MAKE) nif TYPE=release WORDSIZE=32
-
all32: config.32.build
- $(MAKE) driver TYPE=release WORDSIZE=32
- $(MAKE) driver TYPE=debug WORDSIZE=32
+ $(MAKE) nif TYPE=release WORDSIZE=32
+ $(MAKE) nif TYPE=debug WORDSIZE=32
all64: config.64.build
- $(MAKE) driver TYPE=release WORDSIZE=64
- $(MAKE) driver TYPE=debug WORDSIZE=64
+ $(MAKE) nif TYPE=release WORDSIZE=64
+ $(MAKE) nif TYPE=debug WORDSIZE=64
config.32.build: configure
./configure --with-wordsize=32
@@ -184,49 +181,36 @@ clean:
# Make cl library
debug:
- $(MAKE) driver TYPE=debug
+ $(MAKE) nif TYPE=debug
clean_debug:
$(MAKE) clean_internal TYPE=debug
release:
- $(MAKE) driver TYPE=release
+ $(MAKE) nif TYPE=release
ifeq ($(CL_BUILD), false)
-driver:
+nif:
@echo
- @echo Skipping driver for wordsize=$(WORDSIZE), not supported on this system
+ @echo Skipping nif for wordsize=$(WORDSIZE), not supported on this system
@echo
else
-driver: $(CL_DRV)
-endif
-
nif: $(CL_NIF)
-
-cbuf_test: cbuf_test.o
- $(CC) -o $@ cbuf_test.o
-
-cbuf_test.o: cbufv2.h
+endif
depend:
clean_internal:
-rm -f $(OBJDIR)/$(WORDSIZE)/*.o
-$(CL_DRV): $(OCL_LIB) $(CL_DRV_OBJS) # $(CL_ASM)
- $(LD_SHARED) -o $@ $(CL_DRV_OBJS) $(LDFLAGS)
-
$(CL_NIF): $(OCL_LIB) $(CL_NIF_OBJS) # $(CL_ASM)
$(LD_SHARED) -o $@ $(CL_NIF_OBJS) $(LDFLAGS)
-$(OBJDIR)/$(WORDSIZE)/cl_drv.o: cbufv2.h cl_hash.h
+$(OBJDIR)/$(WORDSIZE)/cl_nif.o: cl_hash.h
$(OBJDIR)/$(WORDSIZE)/%.o: %.c
$(CC) -c -o $@ $(CFLAGS) -I$(ERL_C_INCLUDE_DIR) $<
$(OBJDIR)/$(WORDSIZE)/%.s: %.c
$(CC) -S -o $@ $(CFLAGS) -I$(ERL_C_INCLUDE_DIR) $<
-cbuf_test.o: cbuf_test.c
- $(CC) -c -o $@ -g -I$(ERL_C_INCLUDE_DIR) $<
-
Oops, something went wrong.

0 comments on commit 4063eaf

Please sign in to comment.