Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added license and copyright info (MIT)

  • Loading branch information...
commit f805b6685b2ecdba54565d64644f6cccf6d6851d 1 parent bba7b77
@tonyrog authored
View
24 COPYRIGHT
@@ -0,0 +1,24 @@
+Copyright (C) 2007 - 2012, Rogvall Invest AB, <tony@rogvall.se>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+Except as contained in this notice, the name(s) of the above copyright holders
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization.
+
View
16 c_src/cl_hash.c 100755 → 100644
@@ -1,3 +1,19 @@
+/****** BEGIN COPYRIGHT *******************************************************
+ *
+ * Copyright (C) 2007 - 2012, Rogvall Invest AB, <tony@rogvall.se>
+ *
+ * This software is licensed as described in the file COPYRIGHT, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://www.rogvall.se/docs/copyright.txt.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYRIGHT file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****** END COPYRIGHT ********************************************************/
/*
** Linear hash
*/
View
16 c_src/cl_hash.h
@@ -1,3 +1,19 @@
+/****** BEGIN COPYRIGHT *******************************************************
+ *
+ * Copyright (C) 2007 - 2012, Rogvall Invest AB, <tony@rogvall.se>
+ *
+ * This software is licensed as described in the file COPYRIGHT, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://www.rogvall.se/docs/copyright.txt.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYRIGHT file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****** END COPYRIGHT ********************************************************/
#ifndef __ECL_HASH_H__
#define __ECL_HASH_H__
View
26 c_src/cl_nif.c
@@ -1,3 +1,19 @@
+/****** BEGIN COPYRIGHT *******************************************************
+ *
+ * Copyright (C) 2007 - 2012, Rogvall Invest AB, <tony@rogvall.se>
+ *
+ * This software is licensed as described in the file COPYRIGHT, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://www.rogvall.se/docs/copyright.txt.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYRIGHT file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****** END COPYRIGHT ********************************************************/
//
// NIF interface for OpenCL binding
//
@@ -4652,6 +4668,8 @@ static int ecl_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
UNUSED(env);
UNUSED(load_info);
+ DBG("ecl_load");
+
if (!(ecl = enif_alloc(sizeof(ecl_env_t))))
return -1;
if (!(ecl->ref_lock = enif_rwlock_create("ref_lock")))
@@ -5093,6 +5111,7 @@ static int ecl_reload(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
UNUSED(env);
UNUSED(load_info);
UNUSED(priv_data);
+ DBG("ecl_reload");
// FIXME
return 0;
}
@@ -5102,6 +5121,7 @@ static int ecl_upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data,
{
UNUSED(env);
UNUSED(load_info);
+ DBG("ecl_upgrade");
// FIXME
*priv_data = *old_priv_data;
return 0;
@@ -5113,7 +5133,7 @@ static void ecl_unload(ErlNifEnv* env, void* priv_data)
cl_uint i;
cl_uint j;
UNUSED(env);
-
+ DBG("ecl_unload");
for (i = 0; i < ecl->nplatforms; i++) {
ecl_object_t* obj;
@@ -5136,6 +5156,10 @@ static void ecl_unload(ErlNifEnv* env, void* priv_data)
enif_free(ecl);
}
+#warning "testing only, REMOVE before release"
+#define ERL_NIF_INIT_BODY \
+ DBG("erl_nif_init")
+
ERL_NIF_INIT(cl, ecl_funcs,
ecl_load, ecl_reload,
ecl_upgrade, ecl_unload)
View
16 include/cl.hrl
@@ -1,3 +1,19 @@
+%%%---- BEGIN COPYRIGHT -------------------------------------------------------
+%%%
+%%% Copyright (C) 2007 - 2012, Rogvall Invest AB, <tony@rogvall.se>
+%%%
+%%% This software is licensed as described in the file COPYRIGHT, which
+%%% you should have received as part of this distribution. The terms
+%%% are also available at http://www.rogvall.se/docs/copyright.txt.
+%%%
+%%% You may opt to use, copy, modify, merge, publish, distribute and/or sell
+%%% copies of the Software, and permit persons to whom the Software is
+%%% furnished to do so, under the terms of the COPYRIGHT file.
+%%%
+%%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+%%% KIND, either express or implied.
+%%%
+%%%---- END COPYRIGHT ---------------------------------------------------------
%%
%% Definitions used here and there
%%
View
20 src/cl.erl
@@ -1,3 +1,19 @@
+%%%---- BEGIN COPYRIGHT -------------------------------------------------------
+%%%
+%%% Copyright (C) 2007 - 2012, Rogvall Invest AB, <tony@rogvall.se>
+%%%
+%%% This software is licensed as described in the file COPYRIGHT, which
+%%% you should have received as part of this distribution. The terms
+%%% are also available at http://www.rogvall.se/docs/copyright.txt.
+%%%
+%%% You may opt to use, copy, modify, merge, publish, distribute and/or sell
+%%% copies of the Software, and permit persons to whom the Software is
+%%% furnished to do so, under the terms of the COPYRIGHT file.
+%%%
+%%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+%%% KIND, either express or implied.
+%%%
+%%%---- END COPYRIGHT ---------------------------------------------------------
%%% File : cl.erl
%%% Author : Tony Rogvall <tony@rogvall.se>
%%% Description : Erlang OpenCL interface
@@ -167,8 +183,10 @@
-ifdef(debug).
-define(VARIANT, "debug").
+-define(DBG(F,A), io:format((F),(A))).
-else.
-define(VARIANT, "release").
+-define(DBG(F,A), ok).
-endif.
init() ->
@@ -177,7 +195,7 @@ init() ->
4 -> filename:join([Lib,"32","cl_nif"]);
8 -> filename:join([Lib,"64","cl_nif"])
end,
- %% io:format("Loading: ~s\n", [Nif]),
+ ?DBG("Loading: ~s\n", [Nif]),
erlang:load_nif(Nif, 0).
%%
View
16 src/clu.erl
@@ -1,3 +1,19 @@
+%%%---- BEGIN COPYRIGHT -------------------------------------------------------
+%%%
+%%% Copyright (C) 2007 - 2012, Rogvall Invest AB, <tony@rogvall.se>
+%%%
+%%% This software is licensed as described in the file COPYRIGHT, which
+%%% you should have received as part of this distribution. The terms
+%%% are also available at http://www.rogvall.se/docs/copyright.txt.
+%%%
+%%% You may opt to use, copy, modify, merge, publish, distribute and/or sell
+%%% copies of the Software, and permit persons to whom the Software is
+%%% furnished to do so, under the terms of the COPYRIGHT file.
+%%%
+%%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+%%% KIND, either express or implied.
+%%%
+%%%---- END COPYRIGHT ---------------------------------------------------------
%%% File : clu.erl
%%% Author : Tony Rogvall <tony@rogvall.se>
%%% Description : Utilities
Please sign in to comment.
Something went wrong with that request. Please try again.