summaryrefslogtreecommitdiff
path: root/math/librsb/files/patch-rsb__util.c
diff options
context:
space:
mode:
authorStephen Montgomery-Smith <stephen@FreeBSD.org>2015-06-01 23:42:48 +0000
committerStephen Montgomery-Smith <stephen@FreeBSD.org>2015-06-01 23:42:48 +0000
commitc4ea64020855b97643dff4b8e6bac795915dccfa (patch)
tree9e87e7d8c3346e56d330c70af6fd23942a7c3fb2 /math/librsb/files/patch-rsb__util.c
parent- Update to 4.1.3 (diff)
- Add port math/librsb.
librsb is a library for sparse matrix computations featuring the Recursive Sparse Blocks (RSB) matrix format.
Diffstat (limited to 'math/librsb/files/patch-rsb__util.c')
-rw-r--r--math/librsb/files/patch-rsb__util.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/math/librsb/files/patch-rsb__util.c b/math/librsb/files/patch-rsb__util.c
new file mode 100644
index 000000000000..cbd4c5ab8804
--- /dev/null
+++ b/math/librsb/files/patch-rsb__util.c
@@ -0,0 +1,29 @@
+--- rsb_util.c.orig 2015-05-01 21:21:34 UTC
++++ rsb_util.c
+@@ -161,6 +161,26 @@ void rsb__util_set_area_to_converted_int
+ return;
+ }
+
++/*
++ * Added because of lack of functionality with FreeBSD
++ * See https://wiki.freebsd.org/Numerics
++ */
++complex float clogf(complex float a) {
++ return logf(cabsf(a)) + I*cargf(a);
++}
++
++complex float cpowf(complex float a, complex float b) {
++ return cexpf(b*clogf(a));
++}
++
++complex double clog(complex double a) {
++ return logf(cabs(a)) + I*carg(a);
++}
++
++complex double cpow(complex double a, complex double b) {
++ return cexp(b*clog(a));
++}
++
+ rsb_coo_idx_t * rsb__util_get_partitioning_array( size_t bs, size_t X , rsb_blk_idx_t * X_b, rsb_flags_t flags){
+ /*!
+ * Given a block size (be it rows or columns), an element size X in bytes,