zarzor_2010

January 12th, 2010, 05:44 AM

Hi all

Please , can you help me solving this problem

I have been searching google for the last week without a good answer

I have the following construcor function in GlobalState class

std::vector<double *> iL_data;

std::vector<double *> iC_data;

GlobalState(int n_iterations, int n_blocks, int n_lines, int n_sections,

double sim_size, int n_points, double x, LineParams &rlcg) :

n_iterations(n_iterations),

n_blocks(n_blocks),

n_lines(n_lines),

n_sections(n_sections),

n_points(n_points),

n_points_per_block(n_points / n_blocks),

t_data(n_blocks, std::vector<double>((n_points / n_blocks) + 1)),

data_node((n_iterations-1)*n_blocks*n_lines*n_sections, 0),

vL_data((n_iterations-1)*n_blocks*n_lines*n_sections, (double *)NULL),

iL_data((n_iterations-1)*n_blocks*n_lines*n_sections, NULL),

iC_data((n_iterations-1)*n_blocks*n_lines*n_sections, NULL),

time_axis(n_points+1),

near_result(n_lines, std::vector<double>(n_points+1)),

far_result(n_lines, std::vector<double>(n_points+1))

When I try to compile this in g++ 4.3 the following error appears/usr/include/c++/4.3/bits/stl_vector.h:290: instantiated from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const _Alloc&) [with _InputIterator = int, _Tp = double*, _Alloc = std::allocator<double*>]’

relax_lumped.h:216: instantiated from here

/usr/include/c++/4.3/bits/stl_vector.h:932: error: invalid conversion from ‘int’ to ‘double*’

/usr/include/c++/4.3/bits/stl_vector.h:932: error: initializing argument 2 of ‘void std::vector<_Tp, _Alloc>::_M_fill_initialize(size_t, const _Tp&) [with _Tp = double*, _Alloc = std::allocator<double*>]’

make[2]: *** [relax_lumped-relax_lumped.o] Error 1

m

whererelax_lumped.h:216 and 217 are the bold lines in the code

I have compiled this code in gentoo

but doesnt compile in ubuntuPlease, can you help me on this issue

I have been stuck in this problem for a while

Thanks alot

really appreciat it

Mina

Please , can you help me solving this problem

I have been searching google for the last week without a good answer

I have the following construcor function in GlobalState class

std::vector<double *> iL_data;

std::vector<double *> iC_data;

GlobalState(int n_iterations, int n_blocks, int n_lines, int n_sections,

double sim_size, int n_points, double x, LineParams &rlcg) :

n_iterations(n_iterations),

n_blocks(n_blocks),

n_lines(n_lines),

n_sections(n_sections),

n_points(n_points),

n_points_per_block(n_points / n_blocks),

t_data(n_blocks, std::vector<double>((n_points / n_blocks) + 1)),

data_node((n_iterations-1)*n_blocks*n_lines*n_sections, 0),

vL_data((n_iterations-1)*n_blocks*n_lines*n_sections, (double *)NULL),

iL_data((n_iterations-1)*n_blocks*n_lines*n_sections, NULL),

iC_data((n_iterations-1)*n_blocks*n_lines*n_sections, NULL),

time_axis(n_points+1),

near_result(n_lines, std::vector<double>(n_points+1)),

far_result(n_lines, std::vector<double>(n_points+1))

When I try to compile this in g++ 4.3 the following error appears/usr/include/c++/4.3/bits/stl_vector.h:290: instantiated from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const _Alloc&) [with _InputIterator = int, _Tp = double*, _Alloc = std::allocator<double*>]’

relax_lumped.h:216: instantiated from here

/usr/include/c++/4.3/bits/stl_vector.h:932: error: invalid conversion from ‘int’ to ‘double*’

/usr/include/c++/4.3/bits/stl_vector.h:932: error: initializing argument 2 of ‘void std::vector<_Tp, _Alloc>::_M_fill_initialize(size_t, const _Tp&) [with _Tp = double*, _Alloc = std::allocator<double*>]’

make[2]: *** [relax_lumped-relax_lumped.o] Error 1

m

whererelax_lumped.h:216 and 217 are the bold lines in the code

I have compiled this code in gentoo

but doesnt compile in ubuntuPlease, can you help me on this issue

I have been stuck in this problem for a while

Thanks alot

really appreciat it

Mina