KappaCUDA 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/KappaCUDA.i +13 -1
  2. data/KappaCUDA_wrap.cpp +201 -1
  3. metadata +5 -5
data/KappaCUDA.i CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  #ifdef SWIGPERL
13
13
  %perlcode %{
14
- $KappaCUDA::VERSION = '1.2.0';
14
+ $KappaCUDA::VERSION = '1.3.0';
15
15
  %}
16
16
  #endif
17
17
 
@@ -25,6 +25,11 @@ $KappaCUDA::VERSION = '1.2.0';
25
25
  %ignore kappa::Value::Type;
26
26
  #endif
27
27
 
28
+ #ifdef SWIGCSHARP
29
+ // This gives a compile warning.
30
+ %ignore kappa::Command::GetType;
31
+ #endif
32
+
28
33
  // Ignore non-exported (hidden) methods and variables
29
34
  %ignore kappa::Kappa::Cancel;
30
35
  %ignore kappa::Kappa::End;
@@ -34,12 +39,16 @@ $KappaCUDA::VERSION = '1.2.0';
34
39
  %ignore cuDevice;
35
40
  %ignore kappa_version;
36
41
  %ignore kappa::Process::Process;
42
+ #ifndef SWIGCSHARP
37
43
  %ignore kappa::Process::GetIOCallbackFunction;
44
+ #endif
38
45
  %ignore kappa::Resource::Resource;
39
46
  %ignore kappa::Resource::CommandDone;
40
47
  %ignore kappa::Resource::CheckCommandReady;
41
48
  %ignore kappa::Context::Context;
49
+ #ifndef SWIGCSHARP
42
50
  %ignore kappa::Recipient;
51
+ #endif
43
52
  %ignore kappa::Variable::Variable;
44
53
  %ignore kappa::Array::Array;
45
54
  %ignore kappa::DeviceMemory;
@@ -72,6 +81,9 @@ $KappaCUDA::VERSION = '1.2.0';
72
81
  #include "kappa/Command.h"
73
82
  #include "kappa/Variable.h"
74
83
  #include "kappa/Array.h"
84
+ #ifdef SWIGCSHARP
85
+ #include "kappa/Recipient.h"
86
+ #endif
75
87
 
76
88
  KAPPA_DLL_EXPORT int *intptr_fromvoidptr(void *voidptr);
77
89
  KAPPA_DLL_EXPORT unsigned *unsignedptr_fromvoidptr(void *voidptr);
data/KappaCUDA_wrap.cpp CHANGED
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 1.2.0
3
+ * Version 1.3.0
4
4
  *
5
5
  * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -2255,6 +2255,9 @@ SWIGINTERN doubleArray *doubleArray_frompointer(double *t){
2255
2255
  #include "kappa/Command.h"
2256
2256
  #include "kappa/Variable.h"
2257
2257
  #include "kappa/Array.h"
2258
+ #ifdef SWIGCSHARP
2259
+ #include "kappa/Recipient.h"
2260
+ #endif
2258
2261
 
2259
2262
  KAPPA_DLL_EXPORT int *intptr_fromvoidptr(void *voidptr);
2260
2263
  KAPPA_DLL_EXPORT unsigned *unsignedptr_fromvoidptr(void *voidptr);
@@ -5771,6 +5774,89 @@ fail:
5771
5774
  }
5772
5775
 
5773
5776
 
5777
+ SWIGINTERN VALUE
5778
+ _wrap_Kappa_StartThread(int argc, VALUE *argv, VALUE self) {
5779
+ kappa::KAPPA_PROCESS arg1 = (kappa::KAPPA_PROCESS) 0 ;
5780
+ void *arg2 = (void *) 0 ;
5781
+ int res2 ;
5782
+ kappa::KappaThread result;
5783
+ VALUE vresult = Qnil;
5784
+
5785
+ if ((argc < 2) || (argc > 2)) {
5786
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5787
+ }
5788
+ {
5789
+ int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg1), SWIGTYPE_p_f_p_void__p_void);
5790
+ if (!SWIG_IsOK(res)) {
5791
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "kappa::KAPPA_PROCESS","kappa::Kappa::StartThread", 1, argv[0] ));
5792
+ }
5793
+ }
5794
+ res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0);
5795
+ if (!SWIG_IsOK(res2)) {
5796
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","kappa::Kappa::StartThread", 2, argv[1] ));
5797
+ }
5798
+ result = kappa::Kappa::StartThread(arg1,arg2);
5799
+ vresult = SWIG_NewPointerObj((new kappa::KappaThread(static_cast< const kappa::KappaThread& >(result))), SWIGTYPE_p_pthread_t, SWIG_POINTER_OWN | 0 );
5800
+ return vresult;
5801
+ fail:
5802
+ return Qnil;
5803
+ }
5804
+
5805
+
5806
+ SWIGINTERN VALUE
5807
+ _wrap_Kappa_WaitForThread(int argc, VALUE *argv, VALUE self) {
5808
+ kappa::KappaThread arg1 ;
5809
+ void *argp1 ;
5810
+ int res1 = 0 ;
5811
+
5812
+ if ((argc < 1) || (argc > 1)) {
5813
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5814
+ }
5815
+ {
5816
+ res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_pthread_t, 0 );
5817
+ if (!SWIG_IsOK(res1)) {
5818
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kappa::KappaThread","kappa::Kappa::WaitForThread", 1, argv[0] ));
5819
+ }
5820
+ if (!argp1) {
5821
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kappa::KappaThread","kappa::Kappa::WaitForThread", 1, argv[0]));
5822
+ } else {
5823
+ arg1 = *(reinterpret_cast< kappa::KappaThread * >(argp1));
5824
+ }
5825
+ }
5826
+ kappa::Kappa::WaitForThread(arg1);
5827
+ return Qnil;
5828
+ fail:
5829
+ return Qnil;
5830
+ }
5831
+
5832
+
5833
+ SWIGINTERN VALUE
5834
+ _wrap_Kappa_CancelThread(int argc, VALUE *argv, VALUE self) {
5835
+ kappa::KappaThread arg1 ;
5836
+ void *argp1 ;
5837
+ int res1 = 0 ;
5838
+
5839
+ if ((argc < 1) || (argc > 1)) {
5840
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5841
+ }
5842
+ {
5843
+ res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_pthread_t, 0 );
5844
+ if (!SWIG_IsOK(res1)) {
5845
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kappa::KappaThread","kappa::Kappa::CancelThread", 1, argv[0] ));
5846
+ }
5847
+ if (!argp1) {
5848
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kappa::KappaThread","kappa::Kappa::CancelThread", 1, argv[0]));
5849
+ } else {
5850
+ arg1 = *(reinterpret_cast< kappa::KappaThread * >(argp1));
5851
+ }
5852
+ }
5853
+ kappa::Kappa::CancelThread(arg1);
5854
+ return Qnil;
5855
+ fail:
5856
+ return Qnil;
5857
+ }
5858
+
5859
+
5774
5860
  swig_class SwigClassKappaConfig;
5775
5861
 
5776
5862
  SWIGINTERN void
@@ -8498,6 +8584,82 @@ fail:
8498
8584
  }
8499
8585
 
8500
8586
 
8587
+ SWIGINTERN VALUE
8588
+ _wrap_Process_SetLabelRanges(int argc, VALUE *argv, VALUE self) {
8589
+ kappa::Process *arg1 = (kappa::Process *) 0 ;
8590
+ std::string arg2 ;
8591
+ kappa::Arguments *arg3 = (kappa::Arguments *) 0 ;
8592
+ void *argp1 = 0 ;
8593
+ int res1 = 0 ;
8594
+ void *argp3 = 0 ;
8595
+ int res3 = 0 ;
8596
+ bool result;
8597
+ VALUE vresult = Qnil;
8598
+
8599
+ if ((argc < 2) || (argc > 2)) {
8600
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
8601
+ }
8602
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kappa__Process, 0 | 0 );
8603
+ if (!SWIG_IsOK(res1)) {
8604
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kappa::Process *","SetLabelRanges", 1, self ));
8605
+ }
8606
+ arg1 = reinterpret_cast< kappa::Process * >(argp1);
8607
+ {
8608
+ std::string *ptr = (std::string *)0;
8609
+ int res = SWIG_AsPtr_std_string(argv[0], &ptr);
8610
+ if (!SWIG_IsOK(res) || !ptr) {
8611
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","SetLabelRanges", 2, argv[0] ));
8612
+ }
8613
+ arg2 = *ptr;
8614
+ if (SWIG_IsNewObj(res)) delete ptr;
8615
+ }
8616
+ res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_kappa__Arguments, 0 | 0 );
8617
+ if (!SWIG_IsOK(res3)) {
8618
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "kappa::Arguments *","SetLabelRanges", 3, argv[1] ));
8619
+ }
8620
+ arg3 = reinterpret_cast< kappa::Arguments * >(argp3);
8621
+ result = (bool)(arg1)->SetLabelRanges(arg2,arg3);
8622
+ vresult = SWIG_From_bool(static_cast< bool >(result));
8623
+ return vresult;
8624
+ fail:
8625
+ return Qnil;
8626
+ }
8627
+
8628
+
8629
+ SWIGINTERN VALUE
8630
+ _wrap_Process_ClearLabelRanges(int argc, VALUE *argv, VALUE self) {
8631
+ kappa::Process *arg1 = (kappa::Process *) 0 ;
8632
+ std::string arg2 ;
8633
+ void *argp1 = 0 ;
8634
+ int res1 = 0 ;
8635
+ bool result;
8636
+ VALUE vresult = Qnil;
8637
+
8638
+ if ((argc < 1) || (argc > 1)) {
8639
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8640
+ }
8641
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kappa__Process, 0 | 0 );
8642
+ if (!SWIG_IsOK(res1)) {
8643
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kappa::Process *","ClearLabelRanges", 1, self ));
8644
+ }
8645
+ arg1 = reinterpret_cast< kappa::Process * >(argp1);
8646
+ {
8647
+ std::string *ptr = (std::string *)0;
8648
+ int res = SWIG_AsPtr_std_string(argv[0], &ptr);
8649
+ if (!SWIG_IsOK(res) || !ptr) {
8650
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","ClearLabelRanges", 2, argv[0] ));
8651
+ }
8652
+ arg2 = *ptr;
8653
+ if (SWIG_IsNewObj(res)) delete ptr;
8654
+ }
8655
+ result = (bool)(arg1)->ClearLabelRanges(arg2);
8656
+ vresult = SWIG_From_bool(static_cast< bool >(result));
8657
+ return vresult;
8658
+ fail:
8659
+ return Qnil;
8660
+ }
8661
+
8662
+
8501
8663
  swig_class SwigClassResult;
8502
8664
 
8503
8665
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
@@ -24718,6 +24880,38 @@ fail:
24718
24880
  }
24719
24881
 
24720
24882
 
24883
+ SWIGINTERN VALUE
24884
+ _wrap_Context_SetPrintfFIFOSize(int argc, VALUE *argv, VALUE self) {
24885
+ kappa::Context *arg1 = (kappa::Context *) 0 ;
24886
+ size_t arg2 ;
24887
+ void *argp1 = 0 ;
24888
+ int res1 = 0 ;
24889
+ size_t val2 ;
24890
+ int ecode2 = 0 ;
24891
+ kappa::Context *result = 0 ;
24892
+ VALUE vresult = Qnil;
24893
+
24894
+ if ((argc < 1) || (argc > 1)) {
24895
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24896
+ }
24897
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kappa__Context, 0 | 0 );
24898
+ if (!SWIG_IsOK(res1)) {
24899
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kappa::Context *","SetPrintfFIFOSize", 1, self ));
24900
+ }
24901
+ arg1 = reinterpret_cast< kappa::Context * >(argp1);
24902
+ ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
24903
+ if (!SWIG_IsOK(ecode2)) {
24904
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","SetPrintfFIFOSize", 2, argv[0] ));
24905
+ }
24906
+ arg2 = static_cast< size_t >(val2);
24907
+ result = (kappa::Context *) &(arg1)->SetPrintfFIFOSize(arg2);
24908
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_kappa__Context, 0 | 0 );
24909
+ return vresult;
24910
+ fail:
24911
+ return Qnil;
24912
+ }
24913
+
24914
+
24721
24915
  swig_class SwigClassCommand;
24722
24916
 
24723
24917
  SWIGINTERN VALUE
@@ -29764,6 +29958,9 @@ SWIGEXPORT void Init_KappaCUDA(void) {
29764
29958
  rb_define_method(SwigClassKappa.klass, "Registered", VALUEFUNC(_wrap_Kappa_Registered), -1);
29765
29959
  rb_define_singleton_method(SwigClassKappa.klass, "Instance", VALUEFUNC(_wrap_Kappa_Instance), -1);
29766
29960
  rb_define_method(SwigClassKappa.klass, "NewDBDriver", VALUEFUNC(_wrap_Kappa_NewDBDriver), -1);
29961
+ rb_define_singleton_method(SwigClassKappa.klass, "StartThread", VALUEFUNC(_wrap_Kappa_StartThread), -1);
29962
+ rb_define_singleton_method(SwigClassKappa.klass, "WaitForThread", VALUEFUNC(_wrap_Kappa_WaitForThread), -1);
29963
+ rb_define_singleton_method(SwigClassKappa.klass, "CancelThread", VALUEFUNC(_wrap_Kappa_CancelThread), -1);
29767
29964
  SwigClassKappa.mark = 0;
29768
29965
  SwigClassKappa.destroy = (void (*)(void *)) free_kappa_Kappa;
29769
29966
  SwigClassKappa.trackObjects = 0;
@@ -29832,6 +30029,8 @@ SWIGEXPORT void Init_KappaCUDA(void) {
29832
30029
  rb_define_method(SwigClassProcess.klass, "ExpandRoutine", VALUEFUNC(_wrap_Process_ExpandRoutine), -1);
29833
30030
  rb_define_method(SwigClassProcess.klass, "DBDriver", VALUEFUNC(_wrap_Process_DBDriver), -1);
29834
30031
  rb_define_method(SwigClassProcess.klass, "FreeDBDriver", VALUEFUNC(_wrap_Process_FreeDBDriver), -1);
30032
+ rb_define_method(SwigClassProcess.klass, "SetLabelRanges", VALUEFUNC(_wrap_Process_SetLabelRanges), -1);
30033
+ rb_define_method(SwigClassProcess.klass, "ClearLabelRanges", VALUEFUNC(_wrap_Process_ClearLabelRanges), -1);
29835
30034
  SwigClassProcess.mark = 0;
29836
30035
  SwigClassProcess.destroy = (void (*)(void *)) free_kappa_Process;
29837
30036
  SwigClassProcess.trackObjects = 0;
@@ -30032,6 +30231,7 @@ SWIGEXPORT void Init_KappaCUDA(void) {
30032
30231
  rb_define_method(SwigClassContext.klass, "MemoryFree", VALUEFUNC(_wrap_Context_MemoryFree), -1);
30033
30232
  rb_define_method(SwigClassContext.klass, "MemoryTotal", VALUEFUNC(_wrap_Context_MemoryTotal), -1);
30034
30233
  rb_define_method(SwigClassContext.klass, "MemoryUsed", VALUEFUNC(_wrap_Context_MemoryUsed), -1);
30234
+ rb_define_method(SwigClassContext.klass, "SetPrintfFIFOSize", VALUEFUNC(_wrap_Context_SetPrintfFIFOSize), -1);
30035
30235
  SwigClassContext.mark = 0;
30036
30236
  SwigClassContext.destroy = (void (*)(void *)) free_kappa_Context;
30037
30237
  SwigClassContext.trackObjects = 0;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: KappaCUDA
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 2
9
- - 1
10
- version: 1.2.1
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Psi Lambda LLC
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-28 00:00:00 -05:00
18
+ date: 2010-07-17 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies: []
21
21